Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
muttsang's avatar
muttsang
Explorer
4 years ago

XR Recenter Not working in Oculus Quest 2 Unity XR interaction toolkit

Hi,
I am using XR Interaction toolkit and XR Plugin for the Oculus Quest 2. 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  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?

 

 

 

thanks

4 Replies

Replies have been turned off for this discussion
  • My understanding was that this was not possible. Last I tried it, all the posts I found essentially suggested that Oculus had decided not to implement recentering on Quest as "all players should know about holding the system button to do it".

     

    I do hope someone can tell me I'm wrong as it's a much needed feature.

     

    Looking it up again just now I found this. Not sure if it helps?

    https://forums.oculusvr.com/t5/Unity-Development/Unity-UnityEngine-XR-Recenter-not-working-on-Quest/m-p/872560

     

    • muttsang's avatar
      muttsang
      Explorer

      hi,

      Thanks for the information. I'm using the XR interaction toolkit so the OVR Solution would not work for my case. 
      I think I'll settle for the default "holding the system button" for now but leave the code for recentering in the files as it will be useful for other VR platforms. 

  • I think you can just reset the postion of the player : 

    public void ResetCamera()
    {
    Rig.transform.position = Vector3.zero;
    Debug.Log("Thanks LaurisD :D");
    }
    • muttsang's avatar
      muttsang
      Explorer

      Hi we've tried this but the head tracking picks up immediately after setting the transform vector to zero. As I've mentioned in my previous reply, we've decided to settle for the default "holding the system button" for now but leave the code for recentering in the files as it will be useful for other VR platforms.