{"_id":"594952f636c5da00107b55ef","project":"571fa55ca0acd42000af9545","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"},"category":{"_id":"594949e62be16d0026ec04d1","version":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-02-25T10:09:14.086Z","from_sync":false,"order":3,"slug":"pointer-renderers","title":"Pointer Renderers"},"user":"571fa519db52d01700f5cf3d","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-20T16:53:10.237Z","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\nSpecifies the smoothing to be applied to the pointer.\n\n## Inspector Parameters\n\n * **Smooths Position:** Whether or not to smooth the position of the pointer origin when positioning the pointer tip.\n * **Max Allowed Per Frame Distance Difference:** The maximum allowed distance between the unsmoothed pointer origin and the smoothed pointer origin per frame to use for smoothing.\n * **Smooths Rotation:** Whether or not to smooth the rotation of the pointer origin when positioning the pointer tip.\n * **Max Allowed Per Frame Angle Difference:** The maximum allowed angle between the unsmoothed pointer origin and the smoothed pointer origin per frame to use for smoothing.\n * **Playarea Cursor:** An optional Play Area Cursor generator to add to the destination position of the pointer tip.\n * **Direction Indicator:** A custom VRTK_PointerDirectionIndicator to use to determine the rotation given to the destination set event.\n * **Custom Raycast:** A custom raycaster to use for the pointer's raycasts to ignore.\n * **Pointer Origin Smoothing Settings:** Specifies the smoothing to be applied to the pointer origin when positioning the pointer tip.\n * **Valid Collision Color:** The colour to change the pointer materials when the pointer collides with a valid object. Set to `Color.clear` to bypass changing material colour on valid collision.\n * **Invalid Collision Color:** The colour to change the pointer materials when the pointer is not colliding with anything or with an invalid object. Set to `Color.clear` to bypass changing material colour on invalid collision.\n * **Tracer Visibility:** Determines when the main tracer of the pointer renderer will be visible.\n * **Cursor Visibility:** Determines when the cursor/tip of the pointer renderer will be visible.\n\n## Class Variables\n\n * `public enum VisibilityStates` - States of Pointer Visibility.\n  * `OnWhenActive` - Only shows the object when the pointer is active.\n  * `AlwaysOn` - Ensures the object is always.\n  * `AlwaysOff` - Ensures the object beam is never visible.\n\n## Class Methods\n\n### GetPointerObjects/0\n\n  > `public abstract GameObject[] GetPointerObjects();`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `GameObject[]` - An array of pointer auto generated GameObjects.\n\nThe GetPointerObjects returns an array of the auto generated GameObjects associated with the pointer.\n\n### InitalizePointer/4\n\n  > `public virtual void InitalizePointer(VRTK_Pointer givenPointer, VRTK_PolicyList givenInvalidListPolicy, float givenNavMeshCheckDistance, bool givenHeadsetPositionCompensation)`\n\n  * Parameters\n   * `VRTK_Pointer givenPointer` - The VRTK_Pointer that is controlling the pointer renderer.\n   * `VRTK_PolicyList givenInvalidListPolicy` - The VRTK_PolicyList for managing valid and invalid pointer locations.\n   * `float givenNavMeshCheckDistance` - The given distance from a nav mesh that the pointer can be to be valid.\n   * `bool givenHeadsetPositionCompensation` - Determines whether the play area cursor will take the headset position within the play area into account when being displayed.\n  * Returns\n   * _none_\n\nThe InitalizePointer method is used to set up the state of the pointer renderer.\n\n### ResetPointerObjects/0\n\n  > `public virtual void ResetPointerObjects()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * _none_\n\nThe ResetPointerObjects method is used to destroy any existing pointer objects and recreate them at runtime.\n\n### Toggle/2\n\n  > `public virtual void Toggle(bool pointerState, bool actualState)`\n\n  * Parameters\n   * `bool pointerState` - The activation state of the pointer.\n   * `bool actualState` - The actual state of the activation button press.\n  * Returns\n   * _none_\n\nThe Toggle Method is used to enable or disable the pointer renderer.\n\n### ToggleInteraction/1\n\n  > `public virtual void ToggleInteraction(bool state)`\n\n  * Parameters\n   * `bool state` - If true then the object interactor will be enabled.\n  * Returns\n   * _none_\n\nThe ToggleInteraction method is used to enable or disable the controller extension interactions.\n\n### UpdateRenderer/0\n\n  > `public virtual void UpdateRenderer()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * _none_\n\nThe UpdateRenderer method is used to run an Update routine on the pointer.\n\n### GetDestinationHit/0\n\n  > `public virtual RaycastHit GetDestinationHit()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `RaycastHit` - The RaycastHit containing the information where the pointer is hitting.\n\nThe GetDestinationHit method is used to get the RaycastHit of the pointer destination.\n\n### ValidPlayArea/0\n\n  > `public virtual bool ValidPlayArea()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `bool` - Returns true if there is a valid play area and no collisions. Returns false if there is no valid play area or there is but with a collision detected.\n\nThe ValidPlayArea method is used to determine if there is a valid play area and if it has had any collisions.\n\n### IsVisible/0\n\n  > `public virtual bool IsVisible()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `bool` - Returns true if either the tracer or cursor renderers are visible. Returns false if none are visible.\n\nThe IsVisible method determines if the pointer renderer is at all visible by checking the state of the tracer and the cursor.\n\n### IsTracerVisible/0\n\n  > `public virtual bool IsTracerVisible()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `bool` - Returns true if the tracer renderers are visible.\n\nThe IsTracerVisible method determines if the pointer tracer renderer is visible.\n\n### IsCursorVisible/0\n\n  > `public virtual bool IsCursorVisible()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `bool` - Returns true if the cursor renderers are visible.\n\nThe IsCursorVisible method determines if the pointer cursor renderer is visible.\n\n### IsValidCollision/0\n\n  > `public virtual bool IsValidCollision()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `bool` - Returns true if the pointer is in a valid collision, returns false if the pointer is in an invalid collision state.\n\nThe IsValidCollision method determines if the pointer is currently in it's valid collision state.\n\n### GetObjectInteractor/0\n\n  > `public virtual GameObject GetObjectInteractor()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `GameObject` - The auto generated object interactor GameObject.\n   * `GameObject` -\n\nThe GetObjectInteractor method returns the auto generated GameObject that acts as the controller extension for interacting with objects.","excerpt":"","slug":"pointer-origin-smoothing-settings","type":"basic","title":"Pointer Origin Smoothing Settings"}

Pointer Origin Smoothing Settings


## Overview Specifies the smoothing to be applied to the pointer. ## Inspector Parameters * **Smooths Position:** Whether or not to smooth the position of the pointer origin when positioning the pointer tip. * **Max Allowed Per Frame Distance Difference:** The maximum allowed distance between the unsmoothed pointer origin and the smoothed pointer origin per frame to use for smoothing. * **Smooths Rotation:** Whether or not to smooth the rotation of the pointer origin when positioning the pointer tip. * **Max Allowed Per Frame Angle Difference:** The maximum allowed angle between the unsmoothed pointer origin and the smoothed pointer origin per frame to use for smoothing. * **Playarea Cursor:** An optional Play Area Cursor generator to add to the destination position of the pointer tip. * **Direction Indicator:** A custom VRTK_PointerDirectionIndicator to use to determine the rotation given to the destination set event. * **Custom Raycast:** A custom raycaster to use for the pointer's raycasts to ignore. * **Pointer Origin Smoothing Settings:** Specifies the smoothing to be applied to the pointer origin when positioning the pointer tip. * **Valid Collision Color:** The colour to change the pointer materials when the pointer collides with a valid object. Set to `Color.clear` to bypass changing material colour on valid collision. * **Invalid Collision Color:** The colour to change the pointer materials when the pointer is not colliding with anything or with an invalid object. Set to `Color.clear` to bypass changing material colour on invalid collision. * **Tracer Visibility:** Determines when the main tracer of the pointer renderer will be visible. * **Cursor Visibility:** Determines when the cursor/tip of the pointer renderer will be visible. ## Class Variables * `public enum VisibilityStates` - States of Pointer Visibility. * `OnWhenActive` - Only shows the object when the pointer is active. * `AlwaysOn` - Ensures the object is always. * `AlwaysOff` - Ensures the object beam is never visible. ## Class Methods ### GetPointerObjects/0 > `public abstract GameObject[] GetPointerObjects();` * Parameters * _none_ * Returns * `GameObject[]` - An array of pointer auto generated GameObjects. The GetPointerObjects returns an array of the auto generated GameObjects associated with the pointer. ### InitalizePointer/4 > `public virtual void InitalizePointer(VRTK_Pointer givenPointer, VRTK_PolicyList givenInvalidListPolicy, float givenNavMeshCheckDistance, bool givenHeadsetPositionCompensation)` * Parameters * `VRTK_Pointer givenPointer` - The VRTK_Pointer that is controlling the pointer renderer. * `VRTK_PolicyList givenInvalidListPolicy` - The VRTK_PolicyList for managing valid and invalid pointer locations. * `float givenNavMeshCheckDistance` - The given distance from a nav mesh that the pointer can be to be valid. * `bool givenHeadsetPositionCompensation` - Determines whether the play area cursor will take the headset position within the play area into account when being displayed. * Returns * _none_ The InitalizePointer method is used to set up the state of the pointer renderer. ### ResetPointerObjects/0 > `public virtual void ResetPointerObjects()` * Parameters * _none_ * Returns * _none_ The ResetPointerObjects method is used to destroy any existing pointer objects and recreate them at runtime. ### Toggle/2 > `public virtual void Toggle(bool pointerState, bool actualState)` * Parameters * `bool pointerState` - The activation state of the pointer. * `bool actualState` - The actual state of the activation button press. * Returns * _none_ The Toggle Method is used to enable or disable the pointer renderer. ### ToggleInteraction/1 > `public virtual void ToggleInteraction(bool state)` * Parameters * `bool state` - If true then the object interactor will be enabled. * Returns * _none_ The ToggleInteraction method is used to enable or disable the controller extension interactions. ### UpdateRenderer/0 > `public virtual void UpdateRenderer()` * Parameters * _none_ * Returns * _none_ The UpdateRenderer method is used to run an Update routine on the pointer. ### GetDestinationHit/0 > `public virtual RaycastHit GetDestinationHit()` * Parameters * _none_ * Returns * `RaycastHit` - The RaycastHit containing the information where the pointer is hitting. The GetDestinationHit method is used to get the RaycastHit of the pointer destination. ### ValidPlayArea/0 > `public virtual bool ValidPlayArea()` * Parameters * _none_ * Returns * `bool` - Returns true if there is a valid play area and no collisions. Returns false if there is no valid play area or there is but with a collision detected. The ValidPlayArea method is used to determine if there is a valid play area and if it has had any collisions. ### IsVisible/0 > `public virtual bool IsVisible()` * Parameters * _none_ * Returns * `bool` - Returns true if either the tracer or cursor renderers are visible. Returns false if none are visible. The IsVisible method determines if the pointer renderer is at all visible by checking the state of the tracer and the cursor. ### IsTracerVisible/0 > `public virtual bool IsTracerVisible()` * Parameters * _none_ * Returns * `bool` - Returns true if the tracer renderers are visible. The IsTracerVisible method determines if the pointer tracer renderer is visible. ### IsCursorVisible/0 > `public virtual bool IsCursorVisible()` * Parameters * _none_ * Returns * `bool` - Returns true if the cursor renderers are visible. The IsCursorVisible method determines if the pointer cursor renderer is visible. ### IsValidCollision/0 > `public virtual bool IsValidCollision()` * Parameters * _none_ * Returns * `bool` - Returns true if the pointer is in a valid collision, returns false if the pointer is in an invalid collision state. The IsValidCollision method determines if the pointer is currently in it's valid collision state. ### GetObjectInteractor/0 > `public virtual GameObject GetObjectInteractor()` * Parameters * _none_ * Returns * `GameObject` - The auto generated object interactor GameObject. * `GameObject` - The GetObjectInteractor method returns the auto generated GameObject that acts as the controller extension for interacting with objects.