Hand Pointer Prefab

A common approach for interacting with UI and 3D objects in an XR scene with hand tracking is to move your index and thumb fingers close to each other and defining the direction and click state of a distant hand pointer. Telerik XR Interactions provides this functionality through its Hand Pointer prefab.

Setting Up the Prefab within the XR Rig Hierarchy

To set up this prefab in your scene:

  1. Drag and drop the Hand Pointer prefab as a direct child of the XR Rig root node.

  2. Edit the HandPointer component on the root level by choosing the tracked hand (for instance, select Left for left hand).

  3. To specify which layers can interact with this pointer, set the Event Mask from the Raycast section.

  4. Make sure that your scene has a single instance of Unity's Event System as this is needed for performing the raycasting calculations.

Using the Prefab as Child of PointersController

If you have several pointers within your application, you will need some logic that manages the priority of each pointer so that their actions are not executed simultaneously. For this purpose, the Telerik XR Core package provides the PointersController class that you can attach to a child object in the XR Rig hierarchy.

For an example on how to integrate the Hand Pointer prefab with the PointersController logic, see the XR Interactions Rig prefab and its Pointers child node. Additionally, if you have purchased the Telerik XR Interaction package, you may see a fully initialized PointersController component instance in the XR Rig Complete prefab and its Pointers prefab child node.

In this article
Not finding the help you need?