Finger Pointer Prefab
A common approach for interacting with UI and 3D objects in an XR scene with hand tracking is by using your virtual hand fingers. Telerik XR Interactions provides this functionality through its Finger Pointer
prefab.
Setting Up the Prefab within the XR Rig Hierarchy
To set up this prefab in your scene:
Drag and drop the
Finger Pointer
prefab as a direct child of the XR Rig root node.Edit the
FingerPointer
component on the root level by choosing the tracked hand (for instance, selectLeft
for left hand).Edit the
FingerPointer
component on the root level by choosing the finger (for instance, selectIndex Finger
).To specify which layers can interact with this pointer, set the
Event Mask
from theRaycast
section.Assign the
Direct Canvas Interaction Sources
value to a Touch Surface Volume Gesture instance in the scene.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 Finger 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 XR Rig Complete
prefab and its Pointers
prefab child node.