{"__v":0,"_id":"58796782cd4a9c37007c972e","category":{"version":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","_id":"58796781cd4a9c37007c96f2","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:38:26.097Z","from_sync":false,"order":2,"slug":"pointers","title":"Pointers"},"parentDoc":null,"project":"571fa55ca0acd42000af9545","user":"571fa519db52d01700f5cf3d","version":{"__v":4,"_id":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","createdAt":"2017-01-13T23:49:21.393Z","releaseDate":"2017-01-13T23:49:21.393Z","categories":["58796781cd4a9c37007c96f0","58796781cd4a9c37007c96f1","58796781cd4a9c37007c96f2","58796781cd4a9c37007c96f3","58796781cd4a9c37007c96f4","58796781cd4a9c37007c96f5","58796781cd4a9c37007c96f6","58796781cd4a9c37007c96f7","58796781cd4a9c37007c96f8","58796781cd4a9c37007c96f9","58796781cd4a9c37007c96fa","58796781cd4a9c37007c96fb","58796781cd4a9c37007c96fc","58796781cd4a9c37007c96fd","58796781cd4a9c37007c96fe","58796781cd4a9c37007c96ff","58796781cd4a9c37007c9700","58b157ca1756cf370022f90d","58b1596f5dae732f00adeca2","58b1605a5dae732f00adecb1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mukota","version_clean":"3.1.0","version":"3.1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-01T16:39:03.183Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"## Overview\n\nThis 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.\n\nIt is utilised by the `VRTK_BasePointer` for dealing with pointer events when the pointer cursor touches areas within the game world.\n\n## Inspector Parameters\n\n * **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.\n\n## Class Events\n\n * `DestinationMarkerEnter` - Emitted when a collision with another game object has occurred.\n * `DestinationMarkerExit` - Emitted when the collision with the other game object finishes.\n * `DestinationMarkerSet` - Emitted when the destination marker is active in the scene to determine the last destination position (useful for selecting and teleporting).\n\n## Unity Events\n\nAdding the `VRTK_DestinationMarker_UnityEvents` component to `VRTK_DestinationMarker` object allows access to `UnityEvents` that will react identically to the Class Events.\n\n * `OnDestinationMarkerEnter` - Emits the DestinationMarkerEnter class event.\n * `OnDestinationMarkerExit` - Emits the DestinationMarkerExit class event.\n * `OnDestinationMarkerSet` - Emits the DestinationMarkerSet class event.\n\n## Event Payload\n\n * `float distance` - The distance between the origin and the collided destination.\n * `Transform target` - The Transform of the collided destination object.\n * `RaycastHit raycastHit` - The optional RaycastHit generated from when the ray collided.\n * `Vector3 destinationPosition` - The world position of the destination marker.\n * `bool forceDestinationPosition` - If true then the given destination position should not be altered by anything consuming the payload.\n * `bool enableTeleport` - Whether the destination set event should trigger teleport.\n * `uint controllerIndex` - The optional index of the controller emitting the beam.\n\n## Class Methods\n\n### SetInvalidTarget/1\n\n  > `public virtual void SetInvalidTarget(VRTK_PolicyList list = null)`\n\n  * Parameters\n   * `VRTK_PolicyList list` - The Tag Or Script list policy to check the set operation on.\n  * Returns\n   * _none_\n\nThe SetInvalidTarget method is used to set objects that contain the given tag or class matching the name as invalid destination targets. It accepts a VRTK_PolicyList for a custom level of policy management.\n\n### SetNavMeshCheckDistance/1\n\n  > `public virtual void SetNavMeshCheckDistance(float distance)`\n\n  * Parameters\n   * `float distance` - The max distance the nav mesh can be from the sample point to be valid.\n  * Returns\n   * _none_\n\nThe SetNavMeshCheckDistance method sets the max distance the destination marker position can be from the edge of a nav mesh to be considered a valid destination.\n\n### SetHeadsetPositionCompensation/1\n\n  > `public virtual void SetHeadsetPositionCompensation(bool state)`\n\n  * Parameters\n   * `bool state` - The state of whether to take the position of the headset within the play area into account when setting the destination marker.\n  * Returns\n   * _none_\n\nThe SetHeadsetPositionCompensation method determines whether the offset position of the headset from the centre of the play area should be taken into consideration when setting the destination marker. If `true` then it will take the offset position into consideration.","excerpt":"","slug":"vrtk_destinationmarker","type":"basic","title":"VRTK_DestinationMarker"}

VRTK_DestinationMarker


## Overview 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_BasePointer` for dealing with pointer events when the pointer cursor touches areas within the game world. ## Inspector Parameters * **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. ## Class Events * `DestinationMarkerEnter` - Emitted when a collision with another game object has occurred. * `DestinationMarkerExit` - Emitted when the collision with the other game object finishes. * `DestinationMarkerSet` - Emitted when the destination marker is active in the scene to determine the last destination position (useful for selecting and teleporting). ## Unity Events Adding the `VRTK_DestinationMarker_UnityEvents` component to `VRTK_DestinationMarker` object allows access to `UnityEvents` that will react identically to the Class Events. * `OnDestinationMarkerEnter` - Emits the DestinationMarkerEnter class event. * `OnDestinationMarkerExit` - Emits the DestinationMarkerExit class event. * `OnDestinationMarkerSet` - Emits the DestinationMarkerSet class event. ## Event Payload * `float distance` - The distance between the origin and the collided destination. * `Transform target` - The Transform of the collided destination object. * `RaycastHit raycastHit` - The optional RaycastHit generated from when the ray collided. * `Vector3 destinationPosition` - The world position of the destination marker. * `bool forceDestinationPosition` - If true then the given destination position should not be altered by anything consuming the payload. * `bool enableTeleport` - Whether the destination set event should trigger teleport. * `uint controllerIndex` - The optional index of the controller emitting the beam. ## Class Methods ### SetInvalidTarget/1 > `public virtual void SetInvalidTarget(VRTK_PolicyList list = null)` * Parameters * `VRTK_PolicyList list` - The Tag Or Script list policy to check the set operation on. * Returns * _none_ The SetInvalidTarget method is used to set objects that contain the given tag or class matching the name as invalid destination targets. It accepts a VRTK_PolicyList for a custom level of policy management. ### SetNavMeshCheckDistance/1 > `public virtual void SetNavMeshCheckDistance(float distance)` * Parameters * `float distance` - The max distance the nav mesh can be from the sample point to be valid. * Returns * _none_ The SetNavMeshCheckDistance method sets the max distance the destination marker position can be from the edge of a nav mesh to be considered a valid destination. ### SetHeadsetPositionCompensation/1 > `public virtual void SetHeadsetPositionCompensation(bool state)` * Parameters * `bool state` - The state of whether to take the position of the headset within the play area into account when setting the destination marker. * Returns * _none_ The SetHeadsetPositionCompensation method determines whether the offset position of the headset from the centre of the play area should be taken into consideration when setting the destination marker. If `true` then it will take the offset position into consideration.