๐Hand Tracking Pose Gesture Tracking
Last updated
Last updated
The HandGestureEvent
class manages hand gesture events, including tracking hands, updating pose difference values, and triggering gesture start and stop events. It also handles optional finger mask settings and directional requirements for gestures.
Poses are saved and managed the same way as Grabbale Pose
Recommend using HandGestureEventTextWriter
script for fine tuning of pose gestures settings
Tracking Hands
: List of hands being tracked for gesture recognition.
Minimum Pose Distance
: The minimum distance required for a pose to be considered valid. Angle distance is calculated in the angles difference between each finger joint current state and it's poses target state. Depending on the hand tracking setup and how the gestures are saved a gesture might not go below ~1, so adjust your minimum pose distance depending on your rig/pose is important.
Required Pose Hold Activation Time
: The required time to hold a pose in seconds for activation. Main to prevent deactivation/activation flickering. Recommend between 0.1-0.4
Required Pose Stop Activation Time
: The required time in seconds to stop holding a pose for deactivation.
Finger Masks
: Optional settings for masking finger positions. Adding a finger mask will cause the finger tracker to ignore fingers set to value 0, value poses from that finger less if set to 0-1, or priorities some finger poses more other by using values over 1.
Required Angle Closeness
: The angle closeness required for directional validation. Direction validation is important depending on the type of pose. A thumbs up pose wants to use a palm axis of
Palm Axis
: (SET TO NONE TO DISABLE) The axis of the palm used for directional validation, compared against the target axis and the given relative transform (if no relative transform it uses world space)
Target Axis
: The target axis used for directional validation.
Relative Transform
: The transform used as a reference for directional validation.
On Gesture Start Event
: Event triggered when a gesture starts.
On Gesture Stop Event
: Event triggered when a gesture stops.
If you want a thumbs up pose, that only works when my thumb is pointing to sky, you need to set the palm axis
to UP (yellow arrow), Set that target axis
to UP with the relative transform
empty, (this will use global up). Then set the Required Angle Closeness to 45. This will only allow the thumbs out pose to trigger if the thumb is pointed to the sky within 45 degrees
In the example above, the HandGestureEventExample
script demonstrates how to subscribe to and handle gesture events using the HandGestureEvent
class.