Why the example of Picking3DApp does not work together with CameraOrtho?

Hi,

there is no reason why this technique would not work with a CameraOrtho. The main difference between an orthographic camera and a perspective one, is that the shape of the viewing area of the former is a box instead of a frustum.

Perspective camera on the left, orthographic camera on the right.

So everything apart from generateRay should be exactly the same and if it doesn’t work I’d start looking at the ray casting first.

If you place the orthographic camera at (0,0,10) looking at (0,0,0), the camera view space will be aligned with world space and the ray created by generateRay will always run parallel with the z-axis (x and y coordinates of its direction will be zero). Can you confirm this?

-Paul