Guides
These docs are for v3.0.0. Click to read the latest docs for v3.3.0.

VRTK_SimplePointer

extends VRTK_BasePointer

Overview

The Simple Pointer 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.

The laser beam is activated by default by pressing the Touchpad on the linked controller. The event it is listening for is the AliasPointer events so the pointer toggle button can be set by changing the Pointer Toggle button on the VRTK_ControllerEvents script parameters.

Inspector Parameters

  • Pointer Thickness: The thickness and length of the beam can also be set on the script as well as the ability to toggle the sphere beam tip that is displayed at the end of the beam (to represent a cursor).
  • Pointer Length: The distance the beam will project before stopping.
  • Show Pointer Tip: Toggle whether the cursor is shown on the end of the pointer beam.
  • Custom Pointer Cursor: A custom Game Object can be applied here to use instead of the default sphere for the pointer cursor.
  • Pointer Cursor Match Target Normal: Rotate the pointer cursor to match the normal of the target surface (or the pointer direction if no target was hit).
  • Pointer Cursor Rescaled Along Distance: Rescale the pointer cursor proportionally to the distance from this game object (useful when used as a gaze 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