{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/14128","repository_url":"https://api.github.com/repos/mrdoob/three.js","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/14128/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/14128/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/14128/events","html_url":"https://github.com/mrdoob/three.js/issues/14128","id":325933193,"number":14128,"title":"`Raycaster.setFromCamera` Error in OrthographicCamera.","user":{"login":"FishOrBear","id":19372111,"avatar_url":"https://avatars0.githubusercontent.com/u/19372111?v=4","gravatar_id":"","url":"https://api.github.com/users/FishOrBear","html_url":"https://github.com/FishOrBear","followers_url":"https://api.github.com/users/FishOrBear/followers","following_url":"https://api.github.com/users/FishOrBear/following{/other_user}","gists_url":"https://api.github.com/users/FishOrBear/gists{/gist_id}","starred_url":"https://api.github.com/users/FishOrBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FishOrBear/subscriptions","organizations_url":"https://api.github.com/users/FishOrBear/orgs","repos_url":"https://api.github.com/users/FishOrBear/repos","events_url":"https://api.github.com/users/FishOrBear/events{/privacy}","received_events_url":"https://api.github.com/users/FishOrBear/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-05-24T01:36:21Z","updated_at":"2018-05-28T16:09:59Z","closed_at":null,"author_association":"NONE","body":"https://github.com/mrdoob/three.js/blob/dev/src/core/Raycaster.js#L85:78\r\n\r\n```\r\nif ( ( camera && camera.isOrthographicCamera ) ) {\r\n\tthis.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera\r\n\tthis.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );\r\n}\r\n```\r\n\r\nwhen\r\n`\r\ncamera.near + camera.far  === 0\r\n`\r\n\r\nRay initialization error.\r\n\r\n\r\nI think the code should be\r\n```\r\nif ( ( camera && camera.isOrthographicCamera ) ) {\r\n\tthis.ray.origin.set( coords.x, coords.y, -1 ).unproject( camera ); // set origin in plane of camera\r\n\tthis.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );\r\n}\r\n```\r\n\r\nDo not know if my understanding is wrong.\r\n\r\n\r\n(sorry,My English is not good, these are from Google Translate.)\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/392563084","html_url":"https://github.com/mrdoob/three.js/issues/14128#issuecomment-392563084","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/14128","id":392563084,"user":{"login":"Mugen87","id":12612165,"avatar_url":"https://avatars2.githubusercontent.com/u/12612165?v=4","gravatar_id":"","url":"https://api.github.com/users/Mugen87","html_url":"https://github.com/Mugen87","followers_url":"https://api.github.com/users/Mugen87/followers","following_url":"https://api.github.com/users/Mugen87/following{/other_user}","gists_url":"https://api.github.com/users/Mugen87/gists{/gist_id}","starred_url":"https://api.github.com/users/Mugen87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mugen87/subscriptions","organizations_url":"https://api.github.com/users/Mugen87/orgs","repos_url":"https://api.github.com/users/Mugen87/repos","events_url":"https://api.github.com/users/Mugen87/events{/privacy}","received_events_url":"https://api.github.com/users/Mugen87/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T16:09:59Z","updated_at":"2018-05-28T16:09:59Z","author_association":"COLLABORATOR","body":"AFAIK, Unity does not allow negative values for `near`. I would prefer a policy similar to other popular engines."}}
{"actor":{"display_login":"Mugen87"}}