{"_id":"594949ea2be16d0026ec0565","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","parentDoc":null,"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"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-02-25T10:10:47.790Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"> extends [VRTK_BasePointerRenderer](doc:vrtk_basepointerrenderer)\n\n## Overview\n\nThe Straight Pointer Renderer emits a coloured beam from the end of the object it is attached to and simulates a laser beam.\n\nIt can be useful for pointing to objects within a scene and it can also determine the object it is pointing at and the distance the object is from the controller the beam is being emitted from.\n\n## Inspector Parameters\n\n * **Maximum Length:** The maximum length the pointer tracer can reach.\n * **Scale Factor:** The scale factor to scale the pointer tracer object by.\n * **Cursor Scale Multiplier:** The scale multiplier to scale the pointer cursor object by in relation to the `Scale Factor`.\n * **Cursor Match Target Rotation:** The cursor will be rotated to match the angle of the target surface if this is true, if it is false then the pointer cursor will always be horizontal.\n * **Cursor Distance Rescale:** Rescale the cursor proportionally to the distance from the tracer origin.\n * **Maximum Cursor Scale:** The maximum scale the cursor is allowed to reach. This is only used when rescaling the cursor proportionally to the distance from the tracer origin.\n * **Custom Tracer:** A custom game object to use as the appearance for the pointer tracer. If this is empty then a Box primitive will be created and used.\n * **Custom Cursor:** A custom game object to use as the appearance for the pointer cursor. If this is empty then a Sphere primitive will be created and used.\n\n## Class Methods\n\n### UpdateRenderer/0\n\n  > `public override 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### GetPointerObjects/0\n\n  > `public override 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## Example\n\n`VRTK/Examples/003_Controller_SimplePointer` shows the simple pointer in action and code examples of how the events are utilised and listened to can be viewed in the script `VRTK/Examples/Resources/Scripts/VRTK_ControllerPointerEvents_ListenerExample.cs`","excerpt":"","slug":"vrtk_straightpointerrenderer","type":"basic","title":"VRTK_StraightPointerRenderer"}

VRTK_StraightPointerRenderer


> extends [VRTK_BasePointerRenderer](doc:vrtk_basepointerrenderer) ## Overview The Straight Pointer Renderer emits a coloured beam from the end of the object it is attached to and simulates a laser beam. It can be useful for pointing to objects within a scene and it can also determine the object it is pointing at and the distance the object is from the controller the beam is being emitted from. ## Inspector Parameters * **Maximum Length:** The maximum length the pointer tracer can reach. * **Scale Factor:** The scale factor to scale the pointer tracer object by. * **Cursor Scale Multiplier:** The scale multiplier to scale the pointer cursor object by in relation to the `Scale Factor`. * **Cursor Match Target Rotation:** The cursor will be rotated to match the angle of the target surface if this is true, if it is false then the pointer cursor will always be horizontal. * **Cursor Distance Rescale:** Rescale the cursor proportionally to the distance from the tracer origin. * **Maximum Cursor Scale:** The maximum scale the cursor is allowed to reach. This is only used when rescaling the cursor proportionally to the distance from the tracer origin. * **Custom Tracer:** A custom game object to use as the appearance for the pointer tracer. If this is empty then a Box primitive will be created and used. * **Custom Cursor:** A custom game object to use as the appearance for the pointer cursor. If this is empty then a Sphere primitive will be created and used. ## Class Methods ### UpdateRenderer/0 > `public override void UpdateRenderer()` * Parameters * _none_ * Returns * _none_ The UpdateRenderer method is used to run an Update routine on the pointer. ### GetPointerObjects/0 > `public override 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. ## Example `VRTK/Examples/003_Controller_SimplePointer` shows the simple pointer in action and code examples of how the events are utilised and listened to can be viewed in the script `VRTK/Examples/Resources/Scripts/VRTK_ControllerPointerEvents_ListenerExample.cs`