Search Unity

Question Any events to know if teleportation is done?

Discussion in 'XR Interaction Toolkit and Input' started by zyonneo, Apr 8, 2021.

  1. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    I want to know if teleportation is done. When I touch the primary2d axis in Upward direction in my right joystick(Oculus) I want teleport ray to appear and choose a destination to teleport(similar to SteamVR Player).Teleportation is done when I remove my finger from the joystick .So after teleportation I want to turn off the ray. Any idea how to turn off teleport ray after teleportation.
     
  2. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    232
    The
    TeleportationProvider
    behavior inherits an
    endLocomotion
    event that you can subscribe to that is invoked when a teleportation occurs.

    If you have an input Action like Teleport Mode Activate in the sample that XRI has, you could also listen for that action going true/false to know when to turn on/off visualizations for the teleportation aiming.