Skip to main content
New Participant
May 30, 2022

Can we do oculus camera reset in code when we are using Unity XR Rig

We are implement the 6DOP Application in Quest using Unity XR Plugin.
we are facing the issue distance between rig and camera while player movement by physical walk, by fix this issue, the default option is there in oculus by long press the home button, but we need to reset the distance between rig and camera position without long press the oculus home button.

Please anyone help us to fix this.

    This topic has been closed for replies.

    1 reply

    Honored Contributor
    May 31, 2022

     

    You can't use the recenter functionality on Quest (for some obscure reason that's been locked down on the standalone platform). Works on desktop though.

     

    private void ForceRecenter(){
                List<InputDevice> devices = new List<InputDevice>();
                InputDevices.GetDevices( devices );
                if ( devices.Count != 0 )
                {
                    devices[0].subsystem.TryRecenter();
                }
        }

     

     
    Even then, I'm not sure that would truly solve your problem. I'd recommend buying an asset like HurricaneVR and seeing how they resolve that issue of controller and camera becoming separated through player movement. It's not a trivial thing to resolve and there are a number of ways of approaching it, depending on your use case.