Immerse SDK
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Teleport Events

Events are triggered when teleporting. These can be used for things such as animations or updating locations of objects with the avatar’s new position.

OnPreTeleport

This event is triggered before a teleport takes place. The delay value is supplied to help drive teleportation animations as well as the selected mode.

using ImmerseSDK.Interaction.Locomotion;

Teleport.OnPreTeleport += (delay, mode) => 
{ 
  Debug.Log($"Teleporting in {delay}s. Mode: {mode}");
};

OnPostTeleport

This event is triggered once a teleport is completed. This can be used to trigger exit animations. The teleport mode is supplied.

using ImmerseSDK.Interaction.Locomotion;

Teleport.OnPostTeleport += mode => 
{ 
  Debug.Log($"Teleport complete. Mode: {mode}");
};