Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Custom Hand Gesture


Introduction

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.

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.

ucustomgesture1

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,
    }

unitydebughandgesture.png

In Custom Gesture Manager, you need to define the straight and blending low bound degree of Distal, Intermediate and Proximal for each finger.

unitycustomgesturemanager.png

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,
}

unitycustomgesturedefiner.png


Play the Sample map

  1. Make sure the OpenXR Wrist Tracker extension is enabled, the setting is in Edit > Project Settings > XR Plug-in Management > OpenXR.

    unityprojectsettings

  2. The sample map is under Assets > Samples > VIVE > OpenXR > Samples > CustomGesture.

  3. The sample shows custom gesture detect result.
    unityplayresult1