Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question XR Interaction Toolkit: How to cancel teleport?

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

  1. PenProd


    Dec 17, 2022
    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?