Search Unity

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

Discussion in 'AR/VR (XR) Discussion' started by Saravana_Vins, Nov 26, 2021.

  1. Saravana_Vins

    Saravana_Vins

    Joined:
    May 5, 2017
    Posts:
    35
    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.
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    To account for physical walk, I believe, you'd need to alter the way you're handling XR Rig.

    Basically you shouldn't assume that root of XR rig corresponds to a specific point in space. And if HMD position is used to drive a character, then the character can be placed outside of XR rig and could read HMD/controller position/orientation directly.
     
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,048
    I personally put a collider on the camera object to account for that, depends on your needs
     
  4. Saravana_Vins

    Saravana_Vins

    Joined:
    May 5, 2017
    Posts:
    35
    Hi all,
    Just following up again to my Initial Post. Any one have guide to solve the issue.

    Thanks