cancel
Showing results for 
Search instead for 
Did you mean: 

Unity Win64 centerEyeAnchor.localPosition Bug

dfortney
Honored Guest
If I enable oculus vr support in unity from player settings as the only device and disable positional tracking in the OVRCameraRig of my scene it works entirely as expected with the localPosition of the centerEyeAnchor always at (0, 0, 0).  The bug occurs if I have an application that specifies 'none' before 'oculus' in player settings vr support and later enables vr for a certain scene during runtime.  In this case the centerEyeAnchor takes on a permanent localPosition related to where the headset was in room space when vr support was enabled during runtime.  There is no way to zero it out in code as it get instantly set back to the offset values.  logging the values for centerEyeAnchor.localPosition before and after the call OVRCameraRig makes to plugin tracking shows the before value to be non-zero and the after value again zero toggling back and forth on every frame.  This makes it impossible to set a reliable Camera root position in VR for our game.  Attempting to set the camera root position to the position we want the player to be at minus the runtime localPosition of the centerEyeAnchor also doesn't work reliably.
1 REPLY 1

cybereality
Grand Champion
Moving to Unity dev section.