Meta Hand Tracking Aim OpenXR feature
Unity provides support for the Meta Hand Tracking Aim OpenXR extension specified by Khronos. For this extension to work, you must also enable the Hand Tracking Subsystem OpenXR feature.
This extension requires you to install the OpenXR Plugin package. For this extension to work when deployed to a Meta Quest device, the OpenXR Plugin package version must be 1.6.0 or newer.
Enable this OpenXR feature to expose the MetaAimHand input device within the Unity Input System, which is a type of Tracked Input Device.
Available controls
The following table outlines the mapping between the OpenXR paths and Unity's implementation:
| Data | Binding Path | Type |
|---|---|---|
| Position | <MetaAimHand>/devicePosition(or <TrackedDevice>/devicePosition) |
Vector3 |
| Rotation | <MetaAimHand>/deviceRotation(or <TrackedDevice>/deviceRotation) |
Quaternion |
| Is Tracked | <MetaAimHand>/isTracked(or <TrackedDevice>/isTracked) |
Boolean |
| Tracking State | <MetaAimHand>/trackingState(or <TrackedDevice>/trackingState) |
Integer (flags enum) |
| Aim Flags | <MetaAimHand>/aimFlags |
Integer (flags enum) |
| Index Pinch Strength | <MetaAimHand>/pinchStrengthIndex |
Float 0 to 1 |
| Middle Pinch Strength | <MetaAimHand>/pinchStrengthMiddle |
Float 0 to 1 |
| Ring Pinch Strength | <MetaAimHand>/pinchStrengthRing |
Float 0 to 1 |
| Little Pinch Strength | <MetaAimHand>/pinchStrengthLittle |
Float 0 to 1 |
| Is Index Pressed | <MetaAimHand>/indexPressed |
Boolean |
| Is Middle Pressed | <MetaAimHand>/middlePressed |
Boolean |
| Is Ring Pressed | <MetaAimHand>/ringPressed |
Boolean |
| Is Little Pressed | <MetaAimHand>/littlePressed |
Boolean |
To specify a particular hand, you can add {LeftHand} or {RightHand} after the <MetaAimHand> in the binding, such as <MetaAimHand>{LeftHand}/devicePosition.
For more information about the Meta Hand Tracking Aim extension, see the OpenXR Specification: XR_FB_hand_tracking_aim.