Search Unity

Question Make XRRig move follow headset (real life movement)

Discussion in 'XR Interaction Toolkit and Input' started by DavidNLN, Feb 4, 2021.

  1. DavidNLN

    DavidNLN

    Joined:
    Sep 27, 2018
    Posts:
    90
    I cant find a way to make the XRRig follow the headset movement.

    It seems like the continuous movement is only designed for controllers.

    I tried using the Tracked Pose Driver, but as it Sets the XRRig location on start it teleports the XRRig away from where it is placed on the scene.

    Anything obvious I missed?
     
  2. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    231
    The XRRig is assumed to be the GameObject that you move through script and through the Locomotion System. The Camera GameObject that it references is assumed to be the object that is driven by the HMD using the Tracked Pose Driver. The Transform of the Camera will be updated every frame, but that leaves the XRRig free to update by user code and systems. We don't expect the Tracked Pose Driver to be on the XRRig itself.

    If you are trying to do something where you move the XRRig based on offsets of where the player is tilting, you should implement that by a Locomotion Provider rather than using a Tracked Pose Driver on the XRRig.