public class GestureResult

Class containing detection result for one hand.


public float confidence

Returns confidence of the hand, within [0, 1].

public GestureType gesture

Returns pre-defined gesture type.

public float pinchLevel

Returns pinch (thumb & index) level of the hand, within [0, 1], higher means more possible to pinch. If you only need a boolean value for pinch or not, you can use isPinching instead.

public Vector3 point

Returns position of the hand. This field is guaranteed to be not null.

For 2D point mode, z is always 0.25.

For skeleton mode, this is position of palm.

+x is right, +y is up, +z is front. Unit is meter.

public float[] points

Returns position of the hand. The meaning of this field is different based on actual mode. Index (3*i, 3*i+1, 3*i+2) composes a (x, y, z) point. There is total 21 points.

NOTE: Don’t modify the array.

For 2D/3D point mode, only first 3 elements are useful, which is same as point.

For skeleton mode, keypoints of the hand, values (0, 0, 0) indicates invalid point.

+x is right, +y is up, +z is front. Unit is meter.

public boolean valid

Returns if this hand is detected/valid.


public boolean isPinching()

Returns if thumb & index finger is pinching or not. If you need a range value within [0, 1], you can use pinchLevel instead.