Hand

Information about a hand!

Instance Fields and Properties

   
BtnState grip Is the hand making a grip gesture right now? Fingers next to the palm.
float gripActivation What percentage of activation is the grip gesture right now? Where 0 is a hand in an outstretched resting position, and 1 is ring finger touching the base of the palm, within a device error tolerant threshold.
Handed handed Is this a right hand, or a left hand?
Pose palm The position and orientation at the center of the palm! Here, Forward is the direction the palm is facing. X+ is to the outside of the right hand, and to the inside of the left hand.
BtnState pinch Is the hand making a pinch gesture right now? Finger and thumb together.
float pinchActivation What percentage of activation is the pinch gesture right now? Where 0 is a hand in an outstretched resting position, and 1 is fingers touching, within a device error tolerant threshold.
BtnState tracked Is the hand being tracked by the sensors right now?
Pose wrist Pose of the wrist. TODO: Not populated right now.

Static Fields and Properties

   
bool IsGripped Are the fingers currently gripped?
bool IsJustGripped Have the fingers just been gripped this frame?
bool IsJustPinched Have the fingers just been pinched this frame?
bool IsJustTracked Has the hand just started being tracked this frame?
bool IsJustUngripped Have the fingers just stopped being gripped this frame?
bool IsJustUnpinched Have the fingers just stopped being pinched this frame?
bool IsJustUntracked Has the hand just stopped being tracked this frame?
bool IsPinched Are the fingers currently pinched?
bool IsTracked Is the hand being tracked by the sensors right now?
Material Material Set the Material used to render the hand! The default material uses an offset of -10 for optimization and transparency order.
bool Solid Should the hand be considered solid by the physics system?
bool Visible Should the hand be rendered?

Examples

Here’s a small example of checking to see if a finger joint is inside a box, and drawing an axis gizmo when it is!

// A volume for checking inside of! 10cm on each side, at the origin
Bounds testArea = new Bounds(Vec3.One * 0.1f);

// This is a decent way to show we're working with both hands
for (int h = 0; h < (int)Handed.Max; h++)
{
    // Get the pose for the index fingertip
    Hand hand      = Input.Hand((Handed)h);
    Pose fingertip = hand[FingerId.Index, JointId.Tip].Pose;

    // Draw the fingertip pose axis if it's inside the volume
    if (testArea.Contains(fingertip.position))
        Lines.AddAxis(fingertip);
}