Custom Hand Gesture
VIVE OpenXR plugin provides the gesture interface. Before using the Custom Gesture API, add Custom Gesture Definer and Custom Gesture Manager Components from the package VIVE OpenXR Plugin > Runtime > Toolkits > CustomGesture > Script.
Supported Platforms and Devices
Platform | Headset | Supported | Plugin Version | |
PC | PC Streaming | Focus 3/XR Elite/Focus Vision | X | |
Pure PC | Vive Cosmos | X | ||
Vive Pro series | X | |||
AIO | Focus 3/XR Elite/Focus Vision | V | 2.2.0 and above |
Specification
This chapter will explore how to create more immersive experiences using the Custom Gestures feature within the VIVE XR Hand Tracking extension.
Environment Settings
Make sure the OpenXR Wrist Tracker extension is enabled, the setting is in Edit > Project Settings > XR Plug-in Management > OpenXR.
Golden Sample
How to use OpenXR Custom Gesture Feature
Add Custom Gesture Definer and Custom Gesture Manager components. You can refer to the Assets > Samples > VIVE > OpenXR > Samples > CustomGesture for the usage of Custom Gesture.
In Debug Hand Gesture, you need to configure the text for each finger of dual hands and the Finger Status will be shown on the scene when detected. This component calls Custom Gesture Manager to get the Finger Status result.
Detect the Finger Status result
enum FingerStatus
{
None = 0,
Straight = 1,
Bending = 2,
Bended = 3,
Num = 4,
}
In Custom Gesture Manager, you need to define the straight and blending low bound degree of Distal, Intermediate and Proximal for each finger.
In Custom Gesture Definer, you can configure the Finger Status for customize gestures. The Dual Hand Distance is only used for dual hand gesture. The Thumb Index Distance is defined as the thumb and index finger distance which only supports single hand gesture.
public enum TargetFingerStatus
{
DontCare = 0,
Straight = 1,
Bending = 2,
Bended = 3,
NotStraight = 4,
NotBending = 5,
NotBended = 6,
}
Play the Sample map
- The sample map is under Assets > Samples > VIVE > OpenXR > Samples > CustomGesture.
- The sample shows custom gesture detect result.
See Also
VIVE XR HandTracking extension.