cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I reset the Quest's headset position in Unity?

TayoEXE
Honored Guest

I'm developing in Unity for Quest and I've come across something disappointing and confusing. All I want to do is make sure when I load up a new scene that the headset resets its position and orientation to the place I've specified (so, you know, it doesn't put me outside of a scene, etc.). When you use move around physically, your play space position does not move with your headset. So these are two separate positions and orientations.

Normally, if I was to move away from the play space origin and teleported somewhere to a place that loads the next scene, the headset is placed the same distance from where I place the origin in the next screen, making me appear in unintended places.

I have tried using the code for resetting the camera position,

UnityEngine.XR.InputTracking.Recenter();

at the beginning of the scene. This works as intended when previewing on Rift, but it does nothing on my Quest. I have tried absolutely everything to even manually change the headset's transform and return it to the play space origin, but again, works only on Rift. I read somewhere that Oculus intentionally disabled this feature on Quest because a user can reset the play space manually by holding the Oculus button.

If that's true, how in the world am I supposed to do something that should he so simple like this? Why can't I move the headset position like on the Rift? It uses the exact same Oculus SDK and everything.



Here's some of my script where at the beginning of the scene, the headset is supposed to be reset to the playspace origin that I set in the middle of my scene. I commented out a lot since I tried various things but all worked on the Rift but not Quest.

public class MainManager : MonoBehaviour
{
private string sceneName;
public OVRCameraRig _ovr;
private Transform _OVRCameraRig;
private Transform _centerEyeAnchor;


// Start is called before the first frame update
private void Awake()
{
sceneName = SceneManager.GetActiveScene().name;
//_OVRCameraRig = _ovr.transform;
//_centerEyeAnchor = _ovr.centerEyeAnchor;

//_OVRCameraRig = VRTK_DeviceFinder.PlayAreaTransform();
//_centerEyeAnchor = VRTK_DeviceFinder.HeadsetCamera();
//_centerEyeAnchor = _OVRCameraRig;

// This only works with Rift, not Quest, etc.
// UnityEngine.XR.InputTracking.Recenter();
// Use my custom function provided here to manually reset the position and angle
//ResetCameraToPositionOrigin(_OVRCameraRig.position, _OVRCameraRig.rotation.eulerAngles.y);
}

2 REPLIES 2

DanielOS96_Sent
Protege
I am also having this issue. What makes things worse if this was intentional was I wanted to map a position reset to the menu button press that way when someone is using hand tracking they can easily reset their position and not have to pick up a physical controller and press a button taking them out of the experience.

Batussai
Explorer
In this discussion :
https://forums.oculusvr.com/developer/discussion/77189/unity-unityengine-xr-recenter-not-working-on-...
I  have posted an Answer, I hope it helps you