What do you need help with?

Cursor Positioning in S3D (Extended Display) mode

Follow

 

Question:  When using the mouse pointer on the R7, I've found the mouse position to be registered in Unity differently to the current position on the glasses themselves, presenting multiple issues with box colliders and world-space canvases:

  • the colliders/button areas seem to shrink in size,
  • In others the collider seems to have it's position be translated ~50% off the GameObject,
  • And in others this translation leads to a full object width/height away before registering the mouse.

Answer:

When using the Vuforia plugin in Unity with the dual cameras for rendering, or extended display mode in native Android OpenGL rendering, it is expected behavior that the mouse pointer will be off since you are trying to select a GUI that is shown using stereo cameras but the mouse pointer is in a 2D plane.

For example, if you are raycasting from Vuforia camera's left eye, since the cameras are setup as stereo, the raycast will be off with respect to the 2D plane. You will have to translate the mouse cursor position, accounting for stereo camera. The solution would be to make the GUI highlightable/selectable using DPAD events instead of trying to use the cursor to click on UI button stereo objects. 

Have more questions? Submit a request

Comments

Powered by Zendesk