I have an ortho camera setup that is viewing a plane that is perpendicular to the camera view (i.e. a flat background). I’m trying to get the mouse coordinates and convert those a location on the plane that is under the mouse cursor.
I didn’t see any methods in the Camera object that would cast from screen coordinates and tell me the World location on the hit target. Camera.getScreenRay(…) seems like it is almost what I want but it returns a GameObject, not the coordinate where the ray hit the GameObject.
I want to be able to drag objects around with my mouse. So I think I just need to update my dragged object’s location to be the same at the point hitting my plane from the mouse cursor. Is there another way to do this?