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.
NoteThe 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.
NoteUnity 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 dataThe tracking data supplied by the hand API includes:
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.
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 TipAnatomic: Interphalangeal (IP)
Index Finger Unity API: IndexDistalAnatomic: Distal Interphalangeal (DIP)
Middle Finger Unity API: MiddleDistalAnatomic: Distal Interphalangeal (DIP)
Ring Finger Unity API: RingDistalAnatomic: Proximal Interphalangeal (PIP)
Middle Finger Unity API: MiddleIntermediateAnatomic: Proximal Interphalangeal (PIP)
Ring Finger Unity API: RingIntermediateAnatomic: MetacarpoPhalangeal (MCP)
Index Finger Unity API: IndexProximalAnatomic: MetacarpoPhalangeal (MCP)
Middle Finger Unity API: MiddleProximalAnatomic: MetacarpoPhalangeal (MCP)
Ring Finger Unity API: RingProximalAnatomic: Carpometacarpal (CMC)
Index Finger Unity API: IndexMetacarpalAnatomic: Carpometacarpal (CMC)
Middle Finger Unity API: MiddleMetacarpalAnatomic: Carpometacarpal (CMC)
Ring Finger Unity API: RingMetacarpalOpenXR: XR_HAND_JOINT_PALM_EXT
Wrist pointOpenXR: 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4