{"_id":"5b1f8576c2505d0003125481","category":{"_id":"5b1f8576c2505d0003125426","version":"5b1f8576c2505d00031254db","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":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":4,"forked_from":"594949e52be16d0026ec04cd","createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["5b1f8576c2505d0003125424","5b1f8576c2505d0003125425","5b1f8576c2505d0003125426","5b1f8576c2505d0003125427","5b1f8576c2505d0003125428","5b1f8576c2505d0003125429","5b1f8576c2505d000312542a","5b1f8576c2505d000312542b","5b1f8576c2505d000312542c","5b1f8576c2505d000312542d","5b1f8576c2505d000312542e","5b1f8576c2505d000312542f","5b1f8576c2505d0003125430","5b1f8576c2505d0003125431","5b1f8576c2505d0003125432","5b1f8576c2505d0003125433","5b1f8576c2505d0003125434","5b1f8576c2505d0003125435","5b1f8576c2505d0003125436","5b1f8576c2505d0003125437","5b1f8576c2505d0003125438","5b1f8aab9c683000032979e7","5b1f8b2f3073470003ffa5da","5b1f8bd9fd653400031d94f4","5b1f900bd4c5f000036b57bd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mangalica","version_clean":"3.3.0","version":"3.3.0"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-01T16:39:03.183Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"## Overview\n\nProvides a base that all destination markers can inherit from.\n\n**Script Usage:**\n  > This is an abstract class that is to be inherited to a concrete class that provides object control action functionality, therefore this script should not be directly used.\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### SetNavMeshData/1\n\n  > `public virtual void SetNavMeshData(VRTK_NavMeshData givenData)`\n\n * Parameters\n   * `VRTK_NavMeshData givenData` - The NavMeshData object that contains the NavMesh restriction settings.\n * Returns\n   * _none_\n\nThe SetNavMeshData method is used to limit the destination marker to the scene NavMesh based on the settings in the given NavMeshData object.\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 Provides a base that all destination markers can inherit from. **Script Usage:** > This is an abstract class that is to be inherited to a concrete class that provides object control action functionality, therefore this script should not be directly used. ## 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 ### SetNavMeshData/1 > `public virtual void SetNavMeshData(VRTK_NavMeshData givenData)` * Parameters * `VRTK_NavMeshData givenData` - The NavMeshData object that contains the NavMesh restriction settings. * Returns * _none_ The SetNavMeshData method is used to limit the destination marker to the scene NavMesh based on the settings in the given NavMeshData object. ### 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.