Custom gestures
The XR Hands package provides a custom gesture recognizer that can detect when the user performs a gesture that you define as a hand shape and orientation.
Important
The recognizer can detect static poses only. Gestures involving motion, such as a swipe or a throw, are not supported.
To add a custom gesture to a scene, you create and configure a Static Hand Gesture component. This component references a Hand Shape or Hand Pose asset and an XR Hand Tracking Events object. It dispatches UnityEvents when it detects that the user's hand matches the configured hand shape and orientation and when a gesture is no longer detected.
For more information about designing and configuring custom gestures with the XR Hands package, refer to the following topics:
Topic | Description |
---|---|
Gesture design | Discusses the possibilities and challenges to consider when designing your own gestures. |
Gesture building blocks | Outlines the concepts, assets, and components involved in defining a gesture. |
Finger shape | Describes the aspects of a finger shape that you can specify as part of the required hand shape of a gesture. |
Orientation | Provides an overview and visual examples of how you can specified a required orientation for a gesture. |
Hand Shape | How to create and edit Hand Shape assets. |
Hand Pose | How to create and edit Hand Pose assets. |
Static Hand Gesture component | Describes the properties of the Static Hand Gesture component. |
Add a custom gesture | Covers the mechanics of adding a recognizer for a custom gesture to a scene. |
Important
You must import the Gestures sample provided by the XR Hands package to use the Static Hand Gesture component. Refer to Samples for instructions.