API Reference


class GestureProvider

This is a the main class used for hand detection. It handles start/stop of the detection automatically once the script is enabled.

GestureProvider is a singleton class, make sure there is one and only one instance in the whole scene. It provides several static readonly properties about detection status and result.

static GestureResult LeftHand { get; }

Get detection result of left hand. Returns null if left hand is not detected.

static GestureResult RightHand { get; }

Get detection result of right hand. Returns null if right hand is not detected.

static GestureStatus Status { get; }

Returns running status of hand detection.

static GestureFailure Error { get; }

Returns detailed error if Status is GestureStatus.Error.

static Boolean UpdatedInThisFrame { get; }

Returns true if LeftHand and RightHand are updated in this frame. This can be useful for calculating states that only depends on hand result. Since Vive Hand Tracking SDK normally have slower FPS than VR rendering, it saves computation power if these states are only updated when hand results change.

Always return false if detection is not running.

static GestureProvider Current { get; }

Returns the current singleton (or null if no instance exists).

static GestureMode Mode { get; }

Current running mode for detection, value is only valid if Status is GestureStatus.Starting or GestureStatus.Running.

static Boolean HaveSkeleton { get; }

A shortcut for checking skeleton mode. Equivalent to Status == GestureMode.Skeleton.


class GestureResult

Class containing detection result for one hand.

Boolean isLeft { get; }

Returns if this hand is left/right.

Vector3[] points { get; }

Returns position of the hand. This field is guaranteed to be not null. The meaning of this field is different based on actual GestureMode.

  • GestureMode.Point2D

    Only first point is used as the 2D position of hand. Position is always 0.25m in front of camera.

  • GestureMode.Point3D

    Only first point is used as the 3D position of hand.

  • GestureMode.Skeleton

    The points is a 21-sized array with all the keypoints of the hand. See Hand Positions (Modes) for order of the keypoints.


    Some keypoints may be missing due to occulusion from other objects or hand itself. In such cases, a place-holder position is returned which cannot be used as real position. Use GestureHelper.IsValidGesturePoint to check if a keypoint is valid.

GestureType gesture { get; }

Returns pre-defined gesture type.

enum GestureBackend

Enum for selecting computation backend.


Default backend, use GPU on PC and CPU on Android. Recommended.


Use CPU, not supported on PC


Use GPU, supported on PC/Android

enum GestureMode

Enum for detection mode. Larger mode return more info, but runs more slowly. If a mode is not supported on a device, will fallback to previous supported mode.

See also

See Hand Positions (Modes) section for detailed modes description.


Fastest mode, return one 2d point for hand.


Return one 3d point for hand, supported on all dual camera devices.


Return skeleton (21 points) for hand, supported on PC and Focus.

enum GestureType

Enum for predefined gesture classification.

See also

See Pre-defined gesture classification section for detailed gesture description.


All other gestures not in predefined set.

enum GestureFailure

Enum for possible errors in hand detection.


No error occurs.


(Only on Windows) OpenCL is not supported on the machine.

See also

See Notes for Windows for possible solutions.


Start camera failed. This happens if Vive Hand Tracking SDK failed to get camera frames.

  • Windows: See Camera Setup for possible solutions.
  • Android phone & WaveVR: Make sure camera permission is granted before start detection.
    • Some phones does not support NDK Camera2 API (or return no cameras in API).
    • Most WaveVR devices other than Vive Focus does not support camera API yet.

Internal errors.


CPU backend is not supported on Windows. Please use different backend when you start detection.

enum GestureStatus

Enum for possible status in gesture detection.


Detection is not started or stopped.


Detection is started, but first result is not returned yet.


Detection is running and updates result regularly.


Detection failed to start, or error occured during detection.

class GestureHelper

Helper class for extension methods.

static Boolean IsValidGesturePoint (Vector3 point)

Test if a point in skeleton is valid or not. This function can be used as point.IsValidGesturePoint().