A visual pointer representation of a straight beam with an optional cursor at the end.
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.
- Place the
VRTK_StraightPointerRendererscript on the same GameObject as the Pointer script it is linked to.
- Link this Pointer Renderer script to the
Pointer Rendererparameter on the required Pointer script.
- A Pointer script to control the activation of this Pointer Renderer script.
- 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
- 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.
public override void UpdateRenderer()
The UpdateRenderer method is used to run an Update routine on the pointer.
public override GameObject GetPointerObjects()
GameObject- An array of pointer auto generated GameObjects.
The GetPointerObjects returns an array of the auto generated GameObjects associated with the pointer.
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
Updated less than a minute ago