{"action":"created","issue":{"url":"https://api.github.com/repos/xtk/X/issues/78","repository_url":"https://api.github.com/repos/xtk/X","labels_url":"https://api.github.com/repos/xtk/X/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/xtk/X/issues/78/comments","events_url":"https://api.github.com/repos/xtk/X/issues/78/events","html_url":"https://github.com/xtk/X/issues/78","id":5825664,"number":78,"title":"2D screen point to 3D scene point : ray tracing","user":{"login":"Ricola3D","id":1682096,"avatar_url":"https://avatars.githubusercontent.com/u/1682096?v=3","gravatar_id":"","url":"https://api.github.com/users/Ricola3D","html_url":"https://github.com/Ricola3D","followers_url":"https://api.github.com/users/Ricola3D/followers","following_url":"https://api.github.com/users/Ricola3D/following{/other_user}","gists_url":"https://api.github.com/users/Ricola3D/gists{/gist_id}","starred_url":"https://api.github.com/users/Ricola3D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ricola3D/subscriptions","organizations_url":"https://api.github.com/users/Ricola3D/orgs","repos_url":"https://api.github.com/users/Ricola3D/repos","events_url":"https://api.github.com/users/Ricola3D/events{/privacy}","received_events_url":"https://api.github.com/users/Ricola3D/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"haehn","id":64670,"avatar_url":"https://avatars.githubusercontent.com/u/64670?v=3","gravatar_id":"","url":"https://api.github.com/users/haehn","html_url":"https://github.com/haehn","followers_url":"https://api.github.com/users/haehn/followers","following_url":"https://api.github.com/users/haehn/following{/other_user}","gists_url":"https://api.github.com/users/haehn/gists{/gist_id}","starred_url":"https://api.github.com/users/haehn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haehn/subscriptions","organizations_url":"https://api.github.com/users/haehn/orgs","repos_url":"https://api.github.com/users/haehn/repos","events_url":"https://api.github.com/users/haehn/events{/privacy}","received_events_url":"https://api.github.com/users/haehn/received_events","type":"User","site_admin":false},"milestone":null,"comments":22,"created_at":"2012-07-25T08:50:07Z","updated_at":"2016-03-29T13:44:02Z","closed_at":null,"body":"In link with that issue and to not flood Stackoverflow (http://stackoverflow.com/questions/11530198/finding-world-coordinates-from-screen-coordinates/11610673#11610673) I stard a discussion here.\n\nHaehn I need your help to position the ray : for the moment I thought that as every object is the scene is translated by (-centroid vector) and then mutliplied by (mvMatrix*obj_transfMatrix) I just had to do the opposite from the camera beginning position so I could drow a sphere at the camera previous position and then trace a ray from there :\n\nsphere._center = inverse(camera_view) * camera_position + renderer_centroid.\nray.start = sphere.center.\nray._end = sphere.center + 100/norm(ray_vector) * ray_vector.\n\nBut that doesn't fit : it draws a ray that most of the time cross the renderer's centroid but not the \"picked\" object. Do you have any idea ?"},"comment":{"url":"https://api.github.com/repos/xtk/X/issues/comments/202899355","html_url":"https://github.com/xtk/X/issues/78#issuecomment-202899355","issue_url":"https://api.github.com/repos/xtk/X/issues/78","id":202899355,"user":{"login":"moi1882","id":1803936,"avatar_url":"https://avatars.githubusercontent.com/u/1803936?v=3","gravatar_id":"","url":"https://api.github.com/users/moi1882","html_url":"https://github.com/moi1882","followers_url":"https://api.github.com/users/moi1882/followers","following_url":"https://api.github.com/users/moi1882/following{/other_user}","gists_url":"https://api.github.com/users/moi1882/gists{/gist_id}","starred_url":"https://api.github.com/users/moi1882/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moi1882/subscriptions","organizations_url":"https://api.github.com/users/moi1882/orgs","repos_url":"https://api.github.com/users/moi1882/repos","events_url":"https://api.github.com/users/moi1882/events{/privacy}","received_events_url":"https://api.github.com/users/moi1882/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T13:44:01Z","updated_at":"2016-03-29T13:44:01Z","body":"Hi Nico, hi David,\r\n\r\nI know it's an old topic, sorry to undig it.\r\nI can't find the unproject methoc in the API while it is in camera3D.js. Is there a discrepancy between the online API and the project content?\r\n\r\nThen, when I browse to renderer3D.js, I can find the pick3d method. But I cannot use it, as when I test\r\n\"r.pick3d(x,y, 5, 2, 0)\"\r\nI get the following message \"r.pick3d is not a function\"\r\n\r\nr is correctly defined, x and y are correctly setup\r\nIs pick3d callable?\r\nThanks,\r\nLaurent."}}