{"_id":"5b1f8576c2505d00031254c3","project":"571fa55ca0acd42000af9545","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"},"category":{"_id":"5b1f8576c2505d0003125425","version":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-31T16:56:01.612Z","from_sync":false,"order":1,"slug":"prefabs","title":"Prefabs"},"user":"571fa519db52d01700f5cf3d","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-20T16:47:57.406Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":10,"body":"## Overview\n\nAdds a Pointer Direction Indicator to a pointer renderer and determines a given world rotation that can be used by a Destiantion Marker.\n\n**Prefab Usage:**\n * Place the `VRTK/Prefabs/PointerDirectionIndicator/PointerDirectionIndicator` prefab into the scene hierarchy.\n * Attach the `PointerDirectionIndicator` scene GameObejct to the `Direction Indicator` inspector parameter on a `VRTK_BasePointerRenderer` component.\n\n  > This can be useful for rotating the play area upon teleporting to face the user in a new direction without expecting them to physically turn in the play space.\n\n## Inspector Parameters\n\n * **Touchpad Deadzone:** The touchpad axis needs to be above this deadzone for it to register as a valid touchpad angle.\n * **Coordinate Axis:** The axis to use for the direction coordinates.\n * **Include Headset Offset:** If this is checked then the reported rotation will include the offset of the headset rotation in relation to the play area.\n * **Display On Invalid Location:** If this is checked then the direction indicator will be displayed when the location is invalid.\n * **Use Pointer Color:** If this is checked then the pointer valid/invalid colours will also be used to change the colour of the direction indicator.\n * **Indicator Visibility:** Determines when the direction indicator will be visible.\n\n## Class Variables\n\n * `public enum VisibilityState` - States of Direction Indicator Visibility.\n   * `OnWhenPointerActive` - Only shows the direction indicator when the pointer is active.\n   * `AlwaysOnWithPointerCursor` - Only shows the direction indicator when the pointer cursor is visible or if the cursor is hidden and the pointer is active.\n\n## Class Events\n\n * `PointerDirectionIndicatorPositionSet` - Emitted when the object tooltip is reset.\n\n## Unity Events\n\nAdding the `VRTK_PointerDirectionIndicator_UnityEvents` component to `VRTK_PointerDirectionIndicator` 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## Class Methods\n\n### Initialize/1\n\n  > `public virtual void Initialize(VRTK_ControllerEvents events)`\n\n * Parameters\n   * `VRTK_ControllerEvents events` - The Controller Events script that is used to control the direction indicator's rotation.\n * Returns\n   * _none_\n\nThe Initialize method is used to set up the direction indicator.\n\n### SetPosition/2\n\n  > `public virtual void SetPosition(bool active, Vector3 position)`\n\n * Parameters\n   * `bool active` - Determines if the direction indicator GameObject should be active or not.\n   * `Vector3 position` - The position to set the direction indicator to.\n * Returns\n   * _none_\n\nThe SetPosition method is used to set the world position of the direction indicator.\n\n### GetRotation/0\n\n  > `public virtual Quaternion GetRotation()`\n\n * Parameters\n   * _none_\n * Returns\n   * `Quaternion` - The reported rotation of the direction indicator.\n\nThe GetRotation method returns the current reported rotation of the direction indicator.\n\n### SetMaterialColor/2\n\n  > `public virtual void SetMaterialColor(Color color, bool validity)`\n\n * Parameters\n   * `Color color` - The colour to update the direction indicatormaterial to.\n   * `bool validity` - Determines if the colour being set is based from a valid location or invalid location.\n * Returns\n   * _none_\n\nThe SetMaterialColor method sets the current material colour on the direction indicator.\n\n### GetControllerEvents/0\n\n  > `public virtual VRTK_ControllerEvents GetControllerEvents()`\n\n * Parameters\n   * _none_\n * Returns\n   * `VRTK_ControllerEvents` - The associated Controller Events script.\n\nThe GetControllerEvents method returns the associated Controller Events script with the Pointer Direction Indicator script.","excerpt":"","slug":"pointer-direction-indicator","type":"basic","title":"Pointer Direction Indicator"}

Pointer Direction Indicator


## Overview Adds a Pointer Direction Indicator to a pointer renderer and determines a given world rotation that can be used by a Destiantion Marker. **Prefab Usage:** * Place the `VRTK/Prefabs/PointerDirectionIndicator/PointerDirectionIndicator` prefab into the scene hierarchy. * Attach the `PointerDirectionIndicator` scene GameObejct to the `Direction Indicator` inspector parameter on a `VRTK_BasePointerRenderer` component. > This can be useful for rotating the play area upon teleporting to face the user in a new direction without expecting them to physically turn in the play space. ## Inspector Parameters * **Touchpad Deadzone:** The touchpad axis needs to be above this deadzone for it to register as a valid touchpad angle. * **Coordinate Axis:** The axis to use for the direction coordinates. * **Include Headset Offset:** If this is checked then the reported rotation will include the offset of the headset rotation in relation to the play area. * **Display On Invalid Location:** If this is checked then the direction indicator will be displayed when the location is invalid. * **Use Pointer Color:** If this is checked then the pointer valid/invalid colours will also be used to change the colour of the direction indicator. * **Indicator Visibility:** Determines when the direction indicator will be visible. ## Class Variables * `public enum VisibilityState` - States of Direction Indicator Visibility. * `OnWhenPointerActive` - Only shows the direction indicator when the pointer is active. * `AlwaysOnWithPointerCursor` - Only shows the direction indicator when the pointer cursor is visible or if the cursor is hidden and the pointer is active. ## Class Events * `PointerDirectionIndicatorPositionSet` - Emitted when the object tooltip is reset. ## Unity Events Adding the `VRTK_PointerDirectionIndicator_UnityEvents` component to `VRTK_PointerDirectionIndicator` 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`. ## Class Methods ### Initialize/1 > `public virtual void Initialize(VRTK_ControllerEvents events)` * Parameters * `VRTK_ControllerEvents events` - The Controller Events script that is used to control the direction indicator's rotation. * Returns * _none_ The Initialize method is used to set up the direction indicator. ### SetPosition/2 > `public virtual void SetPosition(bool active, Vector3 position)` * Parameters * `bool active` - Determines if the direction indicator GameObject should be active or not. * `Vector3 position` - The position to set the direction indicator to. * Returns * _none_ The SetPosition method is used to set the world position of the direction indicator. ### GetRotation/0 > `public virtual Quaternion GetRotation()` * Parameters * _none_ * Returns * `Quaternion` - The reported rotation of the direction indicator. The GetRotation method returns the current reported rotation of the direction indicator. ### SetMaterialColor/2 > `public virtual void SetMaterialColor(Color color, bool validity)` * Parameters * `Color color` - The colour to update the direction indicatormaterial to. * `bool validity` - Determines if the colour being set is based from a valid location or invalid location. * Returns * _none_ The SetMaterialColor method sets the current material colour on the direction indicator. ### GetControllerEvents/0 > `public virtual VRTK_ControllerEvents GetControllerEvents()` * Parameters * _none_ * Returns * `VRTK_ControllerEvents` - The associated Controller Events script. The GetControllerEvents method returns the associated Controller Events script with the Pointer Direction Indicator script.