The Hand Tracker allows you to track the hands that are in the camera’s view. You can attach 3D objects, special effects, and even triggers to each hand.
Add the Hand Tracker to the scene by clicking + Add object > AR tracking > Hand Tracker in the Hierarchy panel.
We can now apply an object to the Hand Tracker to see it in action. Add a 3D sphere by clicking + Add object > 3D > Sphere. Drag sphere under Hand Tracker to nest it as a child of the tracker entity. The sphere will inherit its position from the Hand Tracker.
Select the dropdown menu at the top of the Preview panel and select the Hand tab. Select one of the Hand Appear videos. We will now see that the sphere entity follows the user’s palm in our preview.
We can change which part of the hand the sphere follows by modifying the parameters of our Hand Tracker. Select the Hand Tracker from the Hierarchy, and navigate to the Inspector panel.
The Anchor dropdown menu allows you to attach objects to parts of the hand. By default, it is set to Hand Center, but we can modify it to track specific fingers. Let’s set to to track the Thumb.
Hand Tracker properties
Achor: The dropdown menu will allow you to designate where objects attach to hand. The options are: Hand Center (default), Thumb tip, Index Finger tip, Middle Finger tip, Ring Finger tip, Pinkie tip, Thumb, Index Finger, Middle Finger, Ring Finger, Pinkie, and Wrist.
Rotate AxisZ: If checked, the object will rotate with the hand direction along the Z axis.
Advanced: Check this box to reveal Distance to Screen.
Distance to Screen: This adjusts the distance of the object from the screen. The larger the value, the further away it will move from the screen. The default value is 20.