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 Distance moved by xr-controller

Discussion in 'XR Interaction Toolkit and Input' started by emmavetland, May 3, 2021.

  1. emmavetland

    emmavetland

    Joined:
    Jan 27, 2021
    Posts:
    1
    Hi,
    I have been making a script that measures how far a player has moved in the real world using XRNodes like this for example with the right hand:
    InputTracking.GetLocalPosition(XRNode.RightHand) at the start of the movement and then comparing it to the end position
    Now I would like to get the distance moved, even if the player moved around in a circle.
    Is the a method to do this with XRNodes? Measuring total distance moved during play?