cancel
Showing results for 
Search instead for 
Did you mean: 

Reorientation from the Universal Menu is not being applied to my game

Chris_W
Honored Guest

Hello!

I am trying to implement this requirement: re-orientation within Universal Menu should reorient users in the app experience

I am using an up-to-date Oculus VR SDK (OVR). I have an OVRManager script attached to an object that persists through all of my scenes.

In the OVRManager Update(), there is this short code that, from my understanding, is supposed to listen for the reorientation from the Universal Menu and apply the reorientation:

if (OVRPlugin.shouldRecenter)
OVRManager.display.RecenterPose();

However the RecenterPose function isn't running. I have also tried this code:

if (OVRPlugin.shouldRecenter)
InputTracking.Recenter();

in a separate script and it is also not called. But if I call InputTracking.Recenter() elsewhere it works as expected. So basically I think there is a disconnect between the Universal Menu and OVRPlugin.shouldRecenter. shouldRecenter is always false regardless of whether I tried to recenter, I think.

If there is anybody here who has any knowledge on what might be happening or how to work around this I would be really grateful. I have considered triggering the recenter on other inputs but it doesn't comply with Oculus' rules. Cheers.

3 REPLIES 3

vrdaveb
Oculus Staff
On Gear VR, the code path you mentioned never gets hit because we do the recenter behind the scenes. By the time the user comes back to your app from the Universal Menu, the poses reported by InputTracking will already be reported in a new, recentered, reference frame. So there's nothing you need to do right now.

AJCMPC
Honored Guest
How about on Rift? I had the same problem. I tested my Rift build via a release channel - I downloaded it into Oculus Home with an authorized account and ran it. In my test, pressing the recenter command did absolutely nothing, even though I definitely had the latest OVRManager script instantiated in the scene. I submitted that build, and to my surprise it was approved. Why does it pass approval if it fails during testing?

vrdaveb
Oculus Staff
How about on Rift?

If you have an active instance of OVRManager.cs in your scene, it will call UnityEngine.VR.InputTracking.Recenter() by default when the user selects recenter from the universal menu. But you can modify it to do something else, depending on what you need. This is not yet optional on Gear VR.

Why does it pass approval if it fails during testing?

Different recentering behaviors may work better for different apps. Some apps (Job Simulator) ignore the request completely. Can you try attaching the mono debugger to your app and breaking on 
OVRManager's call to InputTracking.Recenter? It would be surprising if OVRManager was in the scene and that wasn't called after a recenter request in the UM.