Written by: Ellie Na (2026)
This tutorial explains how to create custom hand gestures in Unity using the XR Hands tools.
It introduces two approaches: manually configuring finger values and generating gestures from recorded hand capture data.
Hand gesture tracking must already be set up
(See the Unity Hand Gesture Tracking Setup page for setup instructions)
'XR Hands' package installed ('Gesture', 'Hand visualizer', 'Hand Capture' in sample tab need to be imported as well)
When designing a system that requires a specific gesture–event mapping for context-specific interactions (e.g., games or immersive tools), you may need to create a custom gesture if the default XR gestures are not sufficient.
In my case, I needed a three-pinch gesture to trigger an annotation tool that feels similar to holding a pencil, which was not included in the default package. So I implemented a custom three-pinch gesture myself.
To begin creating your own hand gestures, you first need to understand the different types of finger shapes available, so that you can apply these shapes to define your fingers. This is will be the main asset you will use to setup your custom gesture. For instance, Unity provides the following finger shapes:
Full Curl: The overall curve of a finger. (A combination of base and tip curl.)
Base Curl: The angle between the hand and the base of the finger.
Tip Curl: The curve of the outer portions of the finger.
Pinch: Whether the finger is in a pinching posture based on how close the tip of the finger is to the tip of the thumb.
Spread: The spread between this finger and the next (moving from thumb to little finger).
Brief Pros and Cons:
This method can be time-consuming because you need to manually configure the value for each finger. But it gives you a clearer understanding of how each finger parameter affects the gesture, so easier to diagnose issues and fine-tune the gesture more precisely.
How to do:
Create a new hand shape (in the Assets panel, right-click and select Create > XR > Hand Interactions > Hand Shape),
and name it for your custom gesture
2. In the Inspector panel, you will see the finger shapes section, where you can assign a shape type for each finger
3. To get a sense of how to set the values, the debug UI can be helpful to see how the values change as you move your fingers in different ways. You could also take a screenshot of this interface and use it as a reference when setting the exact values.
+ To open the debug UI, search for 'Hand Shape Debugger' in Asset, and drag it into the Hierarchy panel
4. Configure the finger values!
(The example I brought here is thumbs-up gesture, the thumb should remain extended while the other fingers are curled.)
Shape: Select the type of finger shape from the five shapes as introduced earlier. Each finger can have multiple shape conditions.
Target: Set the value between 0-1.
0 is a relaxed or open state, 1 is a full state of the selected shape.
Threshold: Define how close the actual finger pose must be to the target value for the gesture to be recognized. Lower values require more precise finger positioning.
Brief Pros and Cons:
This method can speed up the initial setup because you can record a gesture and extract finger values directly from a captured frame, rather than manually configuring each parameter. But the generated values are often very precise, which may require additional fine-tuning to achieve stable gesture detection. As a result, you may spend extra time adjusting the parameters for better reliability.
How to do:
In the Assets panel, search for 'Hand Capture' and double-click it to open the scene.
+ If you cannot find 'Hand Capture', make sure it has been imported from the XR Hands samples tab.
+ If this hand capture scene doesn't appear in your VR headset after clicking Build and Run, open Build Profiles, add the scene to the build list and move it to the top of the list.
2. Start recording (60 sec max for each time), and capture multiple samples of the gesture. If the gesture needs to work for both hands, record samples for each hand.
3. After saving the recording, return to Unity, go to Window > XR > XR Hand Capture. Then click 'Import recording from the connected headset'.
Once the import is complete, you should be able to find the file under assets > HandRecordings. Drag the file into the Recording field. You can then scrub through the timeline and find the frame that best captures the intended custom gesture.
Once you find the right frame, click 'Compute Finger Values'. You will then see the values for each finger.