Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question XR Interaction Toolkit: How to cancel teleport?

Discussion in 'VR' started by PenProd, Jan 27, 2023.

  1. PenProd

    PenProd

    Joined:
    Dec 17, 2022
    Posts:
    171
    Creating an Escape Room-ish game. After they have solved all puzzles, a space will open to which they can teleport. The idea is that if they try to teleport there, instead of actually teleporting, I want them to get some sort of message they have finished the level.

    So how can I stop them actually teleporting there? What I've done so far is create a Teleportation Area that only becomes active after all puzzles have been solved. In the "Teleportation Area" component, under "Interactable Events", I've set it up that whenever the "Teleporting" event is fired, my script is called.

    So in this script, can I actually cancel the teleport? Or do I need to do it someplace else?
     
  2. JonathanCel

    JonathanCel

    Joined:
    Feb 17, 2021
    Posts:
    22