Hand data model
Hand tracking provides data such as position, orientation, and velocity for several points on a user's hand. The following diagram illustrates the tracked points:
Left hand showing tracked hand points
The 26 tracked points of the hand include the finger joints, fingertips, the wrist and the palm.
Note
The thumb has one fewer joint than the other fingers because thumbs do not have an intermediate phalanx.
The hand API reports tracking data relative to the real-world location chosen by the user's device as its tracking origin. Distances are provided in meters. The XR Origin in a properly configured XR scene is positioned relative to the device's tracking origin. To position model hands in the correct place in a virtual scene relative to the user's real hands, you can set the local poses of a hand model in your scene directly from the tracking data as long as the model is a child of the XR Origin's Camera Offset object in the scene hierarchy. In other situations, you can transform the hand data into Unity world space with the XR Origin's pose.
Note
Unity uses a left hand coordinate system, with the positive Z axis facing forward. This is different from the right-handed coordinate system used by OpenXR. Provider plug-in implementations are required to transform the data they provide into the Unity coordinate system.
Tracking data
The tracking data supplied by the hand API includes:
Name | API | Description |
---|---|---|
Hand pose | XRHand.rootPose | The position and rotation of a hand. Positions are in meters and the rotation is expressed as a quaternion. |
Joint pose | XRHandJoint.TryGetPose | The position and rotation of a joint. Note that the term "joint" should be interpreted loosely in this context. The list of joints provided by the XRHand includes the fingertips and the palm. |
Joint radius | XRHandJoint.TryGetRadius | The distance from the center of the joint to the skin surface. |
Joint linear velocity | XRHandJoint.TryGetLinearVelocity | A vector expressing the speed and direction of the joint in meters per second. |
Joint angular velocity | XRHandJoint.TryGetAngularVelocity | A vector expressing a joint's rotational velocity. The direction of this vector is the axis of rotation and its magnitude is the angular velocity in meters per second. |
Grip | XRHandDevice.gripPosition XRHandDevice.gripRotation |
The position and orientation of the center of mass of a hand in a grip pose. |
Pinch | XRHandDevice.pinchPosition XRHandDevice.pinchRotation |
The position and orientation of the point between the thumb and the index finger when the hand is in a pinching pose. |
Poke | XRHandDevice.pokePosition XRHandDevice.pokeRotation |
The position and orientation of the index fingertip when the hand is in a poking pose. |
Device gestures, including pinch, menu pressed, and system. | MetaAimHand.aimFlags | Hand gestures reported through the Meta Aim Hand extension to OpenXR. |
Aim direction and position | MetaAimHand.devicePosition MetaAimHand.deviceRotation |
A pose indicating where a device gesture is pointing, which can be used for UI and other interactions in a scene. |
The XRHand, XRHandJoint, and XRHandDevice objects are always available from a provider plug-in that supports the XRHandSubsystem. However, a provider might not support every possible joint on the hand. You can determine which joints the current device supports with the XRHandSubsystem.jointsInLayout property. Refer to Get provider data layout for more information.
A provider might not support every type of data for a hand or joint, or might not be able to provide it with every hand update event. In both cases, you can determine which data are valid in an update with the XRHandJoint.trackingState property. Refer to Check data validity for more information.
The data for the MetaAimHand is supplied by an optional OpenXR extension. Provider plug-ins are not required to support it. Use the MetaAimHand.aimFlags at runtime to determine if the data in a MetaAimHand
object is valid.
Joint nomenclature
The term "joint" should be interpreted fairly loosely. In this context, a joint is really a point on the hand that is independently tracked. It might not correspond to an anatomical joint. For example, the fingertips, palm, and wrist are not anatomical joints, but they do appear in the list of joints provided by the API.
The Unity API follows the OpenXR joint nomenclature. In addition to including points that aren't joints, the OpenXR API names a joint by its adjacent bone rather than by its anatomical name. For example, the OpenXR API metacarpal "joint" is the end of the metacarpal bone that is closest to the wrist.
The following table provides the API names along with the anatomical joint names for the tracked hand points:
Tracked point | Nomenclature |
Tip |
Thumb |
Unity API: ThumbTip OpenXR: XR_HAND_JOINT_THUMB_TIP_EXT |
|
Index Finger | |
Unity API: IndexTip OpenXR: XR_HAND_JOINT_INDEX_TIP_EXT |
|
Middle Finger | |
Unity API: MiddleTip OpenXR: XR_HAND_JOINT_MIDDLE_TIP_EXT |
|
Ring Finger | |
Unity API: RingTip OpenXR: XR_HAND_JOINT_RING_TIP_EXT |
|
Little Finger | |
Unity API: LittleTip OpenXR: XR_HAND_JOINT_LITTLE_TIP_EXT |
|
Distal point |
Thumb |
Unity API: ThumbDistal OpenXR: XR_HAND_JOINT_THUMB_DISTAL_EXT Anatomic: Interphalangeal (IP) |
|
Index Finger | |
Unity API: IndexDistal OpenXR: XR_HAND_JOINT_INDEX_DISTAL_EXT Anatomic: Distal Interphalangeal (DIP) |
|
Middle Finger | |
Unity API: MiddleDistal OpenXR: XR_HAND_JOINT_MIDDLE_DISTAL_EXT Anatomic: Distal Interphalangeal (DIP) |
|
Ring Finger | |
Unity API: RingDistal OpenXR: XR_HAND_JOINT_RING_DISTAL_EXT Anatomic: Distal Interphalangeal (DIP) |
|
Little Finger | |
Unity API: LittleDistal OpenXR: XR_HAND_JOINT_LITTLE_DISTAL_EXT Anatomic: Distal Interphalangeal (DIP) |
|
Intermediate point |
Thumb |
Not defined (the thumb has one less phalange bone than the other fingers). | |
Index Finger | |
Unity API: IndexIntermediate OpenXR: XR_HAND_JOINT_INDEX_INTERMEDIATE_EXT Anatomic: Proximal Interphalangeal (PIP) |
|
Middle Finger | |
Unity API: MiddleIntermediate OpenXR: XR_HAND_JOINT_MIDDLE_INTERMEDIATE_EXT Anatomic: Proximal Interphalangeal (PIP) |
|
Ring Finger | |
Unity API: RingIntermediate OpenXR: XR_HAND_JOINT_RING_INTERMEDIATE_EXT Anatomic: Proximal Interphalangeal (PIP) |
|
Little Finger | |
Unity API: LittleIntermediate OpenXR: XR_HAND_JOINT_LITTLE_INTERMEDIATE_EXT Anatomic: Proximal Interphalangeal (PIP) |
|
Proximal point |
Thumb |
Unity API: ThumbProximal OpenXR: XR_HAND_JOINT_THUMB_PROXIMAL_EXT Anatomic: Metacarpophalangeal (MCP) |
|
Index Finger | |
Unity API: IndexProximal OpenXR: XR_HAND_JOINT_INDEX_PROXIMAL_EXT Anatomic: Metacarpophalangeal (MCP) |
|
Middle Finger | |
Unity API: MiddleProximal OpenXR: XR_HAND_JOINT_MIDDLE_PROXIMAL_EXT Anatomic: Metacarpophalangeal (MCP) |
|
Ring Finger | |
Unity API: RingProximal OpenXR: XR_HAND_JOINT_RING_PROXIMAL_EXT Anatomic: Metacarpophalangeal (MCP) |
|
Little Finger | |
Unity API: LittleProximal OpenXR: XR_HAND_JOINT_LITTLE_PROXIMAL_EXT Anatomic: Metacarpophalangeal (MCP) |
|
Metacarpal point |
Thumb |
Unity API: ThumbMetacarpal OpenXR: XR_HAND_JOINT_THUMB_DISTAL_EXT Anatomic: Carpometacarpal (CMC) |
|
Index Finger | |
Unity API: IndexMetacarpal OpenXR: XR_HAND_JOINT_INDEX_METACARPAL_EXT Anatomic: Carpometacarpal (CMC) |
|
Middle Finger | |
Unity API: MiddleMetacarpal OpenXR: XR_HAND_JOINT_MIDDLE_METACARPAL_EXT Anatomic: Carpometacarpal (CMC) |
|
Ring Finger | |
Unity API: RingMetacarpal OpenXR: XR_HAND_JOINT_RING_METACARPAL_EXT Anatomic: Carpometacarpal (CMC) |
|
Little Finger | |
Unity API: LittleMetacarpal OpenXR: XR_HAND_JOINT_LITTLE_METACARPAL_EXT Anatomic: Carpometacarpal (CMC) |
|
Palm point |
Unity API: Palm
OpenXR: XR_HAND_JOINT_PALM_EXT |
Wrist point |
Unity API: Wrist
OpenXR: XR_HAND_JOINT_WRIST_EXT |
For the API declarations of the tracked points, refer to the Enum XRHandJointID in the Unity API and XrHandJointEXT in the OpenXR specification.