{"_id":"594949e82be16d0026ec052a","category":{"_id":"594949e62be16d0026ec04d0","version":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:38:26.097Z","from_sync":false,"order":2,"slug":"pointers","title":"Pointers"},"project":"571fa55ca0acd42000af9545","parentDoc":null,"user":"571fa519db52d01700f5cf3d","version":{"_id":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":2,"createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["594949e62be16d0026ec04ce","594949e62be16d0026ec04cf","594949e62be16d0026ec04d0","594949e62be16d0026ec04d1","594949e62be16d0026ec04d2","594949e62be16d0026ec04d3","594949e62be16d0026ec04d4","594949e62be16d0026ec04d5","594949e62be16d0026ec04d6","594949e62be16d0026ec04d7","594949e62be16d0026ec04d8","594949e62be16d0026ec04d9","594949e62be16d0026ec04da","594949e62be16d0026ec04db","594949e62be16d0026ec04dc","594949e62be16d0026ec04dd","594949e62be16d0026ec04de","594949e62be16d0026ec04df","594949e62be16d0026ec04e0","594949e62be16d0026ec04e1","59497219f4a8980024dd0631"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Kunekune","version_clean":"3.2.0","version":"3.2.0"},"__v":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 * **Target List Policy:** A specified VRTK_PolicyList to use to determine whether destination targets will be considered valid or invalid.\n\n## Class Events\n\n * `DestinationMarkerEnter` - Emitted when a collision with another collider has first occurred.\n * `DestinationMarkerExit` - Emitted when the collision with the other collider ends.\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 * All C# delegate events are mapped to a Unity Event with the `On` prefix. e.g. `MyEvent` -> `OnMyEvent`.\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 * `Quaternion? destinationRotation` - The world rotation 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 * `VRTK_ControllerReference controllerReference` - The optional reference to the controller controlling the destination marker.\n\n## Class Methods\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.\n\n### SetForceHoverOnRepeatedEnter/1\n\n  > `public virtual void SetForceHoverOnRepeatedEnter(bool state)`\n\n  * Parameters\n   * `bool state` - The state of whether to force the hover on or off.\n  * Returns\n   * _none_\n\nThe SetForceHoverOnRepeatedEnter method is used to set whether the Enter event will forciably call the Hover event if the existing colliding object is the same as it was the previous enter call.","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. * **Target List Policy:** A specified VRTK_PolicyList to use to determine whether destination targets will be considered valid or invalid. ## Class Events * `DestinationMarkerEnter` - Emitted when a collision with another collider has first occurred. * `DestinationMarkerExit` - Emitted when the collision with the other collider ends. * `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. * All C# delegate events are mapped to a Unity Event with the `On` prefix. e.g. `MyEvent` -> `OnMyEvent`. ## 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. * `Quaternion? destinationRotation` - The world rotation 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. * `VRTK_ControllerReference controllerReference` - The optional reference to the controller controlling the destination marker. ## Class Methods ### 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. ### SetForceHoverOnRepeatedEnter/1 > `public virtual void SetForceHoverOnRepeatedEnter(bool state)` * Parameters * `bool state` - The state of whether to force the hover on or off. * Returns * _none_ The SetForceHoverOnRepeatedEnter method is used to set whether the Enter event will forciably call the Hover event if the existing colliding object is the same as it was the previous enter call.