Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question XRRig rotation during teleport on a slope

Discussion in 'XR Interaction Toolkit and Input' started by beatdesign, Oct 6, 2020.

  1. beatdesign

    beatdesign

    Joined:
    Apr 3, 2015
    Posts:
    137
    Hello,
    If I teleport using TeleportationProvider, LocomotionSystem and TeleportationArea component on the ground, everything is ok.
    When TeleportationArea is on a slope plane, the XRRig is rotated accordingly.
    If I jump off the slope plane to reach the ground again (without teleporting this time!), how can I reset the XRRig rotation? It remains rotated as if I'm on a slope plane. Using XRRig.MAtchRigUpCameraForward() doesn't seem to fix the problem.

    How to do that?