Forum Discussion

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

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.

1 Reply

Replies have been turned off for this discussion
  •  

    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.