WorldToScreenPoint alternative

Hi all, I have a box that user can move and I want to grab the portion of image inside the box when the user click the controller, cropping the entire frame.
I can do it with the emulator, using centerCamera.WorldToScreenPoint to acquire the bounding box screen coordinates.
How can I achieve the same result using glasses?
I know how to grab the view, but how can I transform the bounding box coordinates in view coordinates considering that I don’t have a camera where use WorldToScreenPoint?
Thanks in advance

You should still be able to use the center camera, it’s still there

I can’t, for two reasons, the first is that it seems that the center camera is not active with glasses due to this code inside the NRHMDPoseTracker:

#if UNITY_EDITOR || USING_XR_SDK
if (leftCamera != null)
leftCamera.enabled = false;
if (rightCamera != null)
rightCamera.enabled = false;
centerCamera.depth = 1;
centerCamera.enabled = true;
#else
if (leftCamera != null)
leftCamera.enabled = true;
if (rightCamera != null)
rightCamera.enabled = true;
centerCamera.enabled = false;
#endif

The second reason is that I’m able to grab the left (or right) camera, but it renders only the UI elements, I can’t see the real world.
It seems that this camera render only the unity elements and doesn’t grab the real world.

In addiction, I can grab the UI+real world image using rgbcam, but I don’t konw how to transform the world coordinates in rgbcam coordinates

1 Like

Hi were you able to convert from world coordinates to RGB cam coordinates?