Pointers Prefab

Several Telerik packages provide different predefined pointers that allow you to navigate in the XR scene or to interact with the scene's UI and 3D object. The Telerik XR Integration package provides a Pointers prefab allowing you to quickly set up all of the available pointers with a simple drag and drop action inside the XR Rig root node.

Pointers Controller

The root node of the Pointers prefab has a PointersController component attached. This component is responsible for managing the active state of the different pointers based on their priority. Тhe properties of the PointersController are separated into two sections—Pointers and Gestures. The first section is already initialized within the prefab as it references child nodes. The second section, however, is empty by default and must be further integrated with the scene gestures after dragging and dropping the Pointers prefab.

Child Pointers

Here follows a list of the child pointers with a brief description for each of them:

  • ControllerPointer—two instances of this component are attached to child nodes—one for each hand. The component is responsible for showing the distant interaction pointer when using XR controllers. More information is available in the XR Interactions package documentation.
  • HandPointer—two instances of this component are attached to child nodes—one for each hand. The component is responsible for showing the distant interaction pointer when using hand tracking. More information is available in the XR Interactions package documentation.
  • FingerPointer—four instances of this component are attached to child nodes—one for each hand index and thumb fingers. The component is responsible for achieving close-distance finger interactions when using hand tracking. Its Direct Canvas Interaction Source property value is left empty as it will be further initialized by the PointersController based on the referenced TouchSurfaceVolumeGesture instances. More information is available in the Interactions package documentation.
  • TeleportationPointer—a single instance of this component is attached to a child node. The component is responsible for activating the Teleportation Curve and executing the teleportation action. Its source property value is left empty as it will be further initialized by the PointersController based on the referenced Teleportation Pointer Sources. More information on teleportation is available in the Telerik XR Motions package documentation.

Gestures Integration

To make the pointers working, you must connect them with some gestures that will trigger the actions. These gestures can be related either to controller buttons or hand tracking. After dragging and dropping the Pointers prefab, you must initialize its Gestures properties section as follows:

  • Teleportation Pointer Sources—these are components that inherit from the TeleportationPointerSource abstract class. Such examples are the JoystickTeleportationGesture and the HandLTeleportationGesture components which are part of the Gestures prefab.
  • Touch Surface Sources—these are components of type TouchSurfaceVolumeGesture which provide the touch surfaces in some areas and are available in the Gestures prefab.

Other Requirements

All the pointers are using raycasting to hit scene targets and execute specific events on them. Make sure that your scene has a single instance of Unity's Event System as this is needed for performing the raycasting calculations.

In this article
Not finding the help you need?