vrtk

Enable/Disable VRTK Teleport at runtime


i am using VRTK with HTC Vive, on controller button pressed i want to disable Teleport, can anyone please share their experiences.

regards, Jithendra.


Solution

  • To disable the teleport you have 2 options.

    You can either set the Enable Teleport flag on the destination marker (e.g. the pointer) to false, then whenever you use the pointer and click the selection button it will emit the destination event but the teleporter will ignore it.

    Or you can simply disable the teleport script, so something like MyTeleportScript.enabled = false which will just unregister the teleporter from the scene.