Search Unity

Disable cardboard rotational tracking

Discussion in 'AR/VR (XR) Discussion' started by sldavies, Mar 13, 2019.

  1. sldavies

    sldavies

    Joined:
    Apr 4, 2017
    Posts:
    2
  2. StayTalm_Unity

    StayTalm_Unity

    Unity Technologies

    Joined:
    May 3, 2017
    Posts:
    182
    Hello,
    It's a little hidden, but try this out: XRDevice.DisableAutoXRCameraTracking
    Pass in the camera you'd like to disable and it should disable the automatic camera tracking entirely for you and let you manage the movement yourself.

    If you'd like to replicate what we do under the hood, you can use Monobehaviour.Update and the Application.OnBeforeRender callback to set the camera to the XRNodeState tagged as a Center Eye. Use InputTracking.GetNodeStates to get the entire set of node states and read back the position.

    Ping back if that works for you, or if you need more help.
     
    sldavies and JoeStrout like this.
  3. sldavies

    sldavies

    Joined:
    Apr 4, 2017
    Posts:
    2
    This is perfect. Thank you so much!!
     
    StayTalm_Unity likes this.
  4. Me_Shah

    Me_Shah

    Joined:
    May 21, 2020
    Posts:
    2
    StayTalm_Unity Hi. Thanks this above comment was a hint for me.
    Please can you explain with code to perform "you can use Monobehaviour.Update and the Application.OnBeforeRender callback to set the camera to the XRNodeState tagged as a Center Eye".
    Thanks.