XR Recenter Not working in Oculus Quest 2

Hi,
I’m trying to make it so that when the user presses the “A” button on the oculus quest 2 controller.
It triggers this function and resets the camera.

In the attached image, the commented out code is the new and recommended way of doing it and the Uncommented one is the old/obsolete one.

Both methods work like a perfectly when I’m testing in the Unity editor with the Oculus Headset hooked up via Oculus Live link. When I build and run it on the headset, it doesn’t work.

I’m not sure why this is happening. Can anyone help me please?
7255040--874703--upload_2021-6-20_20-5-6.png

thanks

Hey there!

I am facing a similar problem.

I have three simple scenes with three different room-scale XRRigs. The scenes can be switched by touching a trigger.

When I switch the scene it seems the VRCameras offset to the center of the XRRig is influencing the spawn position in the next scene. My player never spawns on its intended spawnpoint (the XRRig I placed and orientated). So it happens that my player spawns outside of the walls or he is facing a wall instead of the intended direction.

I did some tests (including InputTracking.Recenter()) and did more research above that but all I found are some SteamVR or OculusOVR related solutions.

Thanks for any help in this regard!

Oculus Quest and Quest 2 doesn’t support recentering with code as far as I know, but you can always get around this issue by taking the player offset object under the xr rig and moving it in a way that the player is centered to their rig. This worked for me

1 Like

A bit of insight from the team:

This is by design. Re-centering can only be triggered with the current Quest runtime (long pressing oculus button on right touch controller). So it’s expected that XRInputSubsystem.TryRecenter() is a no-op.

1 Like

But why? Why can’t the app initiate a recenter? That seems like a huge gap - it works on Oculus Link, why is it by design to not work on device?

1 Like

@TreyK-47
For some reason it doesn’t work on Rift (PCVR) either for me.
Here’s the code:

var inputSubsystems = new List<XRInputSubsystem>();
SubsystemManager.GetInstances(inputSubsystems);
for (int i = 0; i < inputSubsystems.Count; i++)
{
     inputSubsystems[i].TryRecenter();
}

Any idea why prevent developer to reset view by script? I think it is a required feature when game is designed to play on sit.