Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
lizhucheng's avatar
lizhucheng
Honored Guest
2 years ago

Issue with Oculus Recenter Function Not Working in Script

Hello, I am currently developing a VR application using the Oculus SDK. I am trying to implement a feature that recenters the player's view when they reach a certain point. For this, I am using the OVRManager.display.RecenterPose(); method.

However, when I call this method, the message "Recenter event detected" is printed in the debug log, but the player's view is not actually recentered. I have tried various ways to solve this problem, but it still remains unresolved.

Here is the code I am using:

 

public void ResetPlayer(Collider other)
{
    other.transform.position = questPos.transform.position;
    other.transform.rotation = Quaternion.Euler(questPos.transform.eulerAngles);
    OVRManager.display.RecenterPose();
}

 

This code is called when the player enters a certain collider, and after resetting the player's position and rotation, it calls RecenterPose().

If anyone has any advice or solutions regarding this issue, I would greatly appreciate your input.

2 Replies

  • Since upgrading to the latest OpenXR and Unity XR Input packages, I have the issue that my view does not recenter anymore, even when the user long-presses the oculus menu button. This might be related.

    • romtecMax's avatar
      romtecMax
      Explorer

      and downgrading to an older version of the XRinput and OpenXR integrations restored the functionality 🙂