{"_id":"5b1f8576c2505d00031254ba","category":{"_id":"5b1f8576c2505d0003125427","version":"5b1f8576c2505d00031254db","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":"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-02-25T10:10:47.790Z","link_external":false,"link_url":"","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\nA visual pointer representation of a straight beam with an optional cursor at the end.\n\n**Optional Components:**\n * `VRTK_PlayAreaCursor` - A Play Area Cursor that will track the position of the pointer cursor.\n * `VRTK_PointerDirectionIndicator` - A Pointer Direction Indicator that will track the position of the pointer cursor.\n\n**Script Usage:**\n * Place the `VRTK_StraightPointerRenderer` script on the same GameObject as the Pointer script it is linked to.\n * Link this Pointer Renderer script to the `Pointer Renderer` parameter on the required Pointer script.\n\n**Script Dependencies:**\n * A Pointer script to control the activation of this Pointer Renderer script.\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/ExampleResources/Scripts/VRTK_ControllerPointerEvents_ListenerExample.cs`","excerpt":"","slug":"vrtk_straightpointerrenderer","type":"basic","title":"VRTK_StraightPointerRenderer"}

VRTK_StraightPointerRenderer


> extends [VRTK_BasePointerRenderer](doc:vrtk_basepointerrenderer) ## Overview A visual pointer representation of a straight beam with an optional cursor at the end. **Optional Components:** * `VRTK_PlayAreaCursor` - A Play Area Cursor that will track the position of the pointer cursor. * `VRTK_PointerDirectionIndicator` - A Pointer Direction Indicator that will track the position of the pointer cursor. **Script Usage:** * Place the `VRTK_StraightPointerRenderer` script on the same GameObject as the Pointer script it is linked to. * Link this Pointer Renderer script to the `Pointer Renderer` parameter on the required Pointer script. **Script Dependencies:** * A Pointer script to control the activation of this Pointer Renderer script. ## 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/ExampleResources/Scripts/VRTK_ControllerPointerEvents_ListenerExample.cs`