class Hand

Information about a hand!

Instance Fields and Properties

HandJoint[] fingers This is a 2D array with 25 HandJoints. You can get the right joint by finger*5 + joint, but really, just use Hand.Get or Hand[] instead. See Hand.Get for more info!
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?
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 to ensure it gets drawn overtop of other elements.
Pose palm The position and orientation of the palm! Position is specifically defined as the middle of the middle finger’s root (metacarpal) bone. For orientation, Forward is the direction the flat of the palm is facing, “Iron Man” style. 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.
Vec3 pinchPt This is an approximation of where the center of a ‘pinch’ gesture occurs, and is used internally by StereoKit for some tasks, such as UI. For simulated hands, this position will give you the most stable pinch location possible. For real hands, it’ll be pretty close to the stablest point you’ll get. This is especially important for when the user begins and ends their pinch action, as you’ll often see a lot of extra movement in the fingers then.
float size This is the size of the hand, calculated by measuring the length of the middle finger! This is calculated by adding the distances between each joint, then adding the joint radius of the root and tip. This value is recalculated at relatively frequent intervals, and can vary by as much as a centimeter.
bool Solid Does StereoKit register the hand with the physics system? By default, this is true. Right now this is just a single block collider, but later will involve per-joint colliders!
BtnState tracked Is the hand being tracked by the sensors right now?
bool Visible Sets whether or not StereoKit should render this hand for you. Turn this to false if you’re going to render your own, or don’t need the hand itself to be visible.
Pose wrist Pose of the wrist. This is located at the base of your hand, and has a rigid orientation that points forward towards your fingers. Its orientation is unrelated to the forearm. This pose can be useful for making a hand relative coordinate space!

Instance Methods

Get Returns the joint information of the indicated hand joint! This also includes fingertips as a ‘joint’. This is the same as the [] operator. Note that for thumbs, there are only 4 ‘joints’ in reality, so StereoKit has JointId.Root and JointId.KnuckleMajor as the same pose, so JointId.Tip is still the tip of the thumb!


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;

	// Skip this hand if it's not tracked
	if (!hand.IsTracked) continue;

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

Found an issue with these docs, or have some additional questions? Create an Issue on Github!