public Ray GetCameraToViewportRay(float screenX, float screenY) { Ray ret; GetCameraToViewportRay(screenX, screenY, out ret); return ret; }
/// <summary> /// Converts a 2D screen coordinate (in pixels) to a 3D ray into the scene. /// </summary> /// <param name="cam"></param> /// <param name="pt"></param> /// <returns></returns> public static Ray ScreenToScene( Camera cam, Vector2 pt ) { return cam.GetCameraToViewportRay( pt.x, pt.y ); }