Skip to content
StoneFox edited this page Jun 8, 2016 · 1 revision

[VRTK_DestinationMarker]

This abstract class provides the ability to emit events of destination markers within the game world. It can be useful for tagging locations for specific purposes such as teleporting.

It is utilised by the VRTK_WorldPointer for dealing with pointer events when the pointer cursor touches areas within the game world.

The following script parameters are available:

  • Enable Teleport: If this is checked then the teleport flag is set to true in the Destination Set event so teleport scripts will know whether to action the new destination.

The following events are emitted:

  • DestinationMarkerEnter: When a collision with another game object has occured.
  • DestinationMarkerExit: When the collision with the other game object finishes.
  • DestinationMarkerSet: When the destination marker is active in the scene to determine the last destination position (useful for selecting and teleporting).

The event payload that is emitted contains:

  • distance: The distance between the origin and the collided destination.
  • target: The Transform of the collided destination object.
  • destinationPosition: The world position of the destination marker.
  • enableTeleport: Whether the destination set event should trigger teleport
  • controllerIndex: The optional index of the controller emitting the beam

Clone this wiki locally