Skip to main content
Version: 1.0

QCHT API

XR Hand Tracking Subsystem

XR Hand Tracking Subsytem is instantiated by the OpenXR hand tracking feature. It controls starting and stopping underlying fetching data loop, exposes hand data and throws hand tracking related events.

StaticDescription
XRHandTrackingSubsystem GetSubsystemInManager()Returns the first XR Hand Tracking Subsystem instance in the Subsystem Manager if it exists
Non-StaticDescription
HandTrackingStatus StatusGets hand tracking status. It can be Idle, Running or Error
void Start()Starts the hand tracking subsystem
void Stop()Stops the hand tracking subsystem
Hand LeftHandLeft hand data
Hand RightHandRight hand data
Hand GetHand(XrHandedness handedness)Gets hand data by handedness
event Action<Hand> OnHandTrackedRaised if a hand has been tracked this frame
event Action<Hand> OnHandUntrackedRaised if a hand has been untracked this frame
event Action<UpdatePhase> OnHandsUpdatedRaised after both hands data have been updated. UpdatePhase can be Dynamic (before Update calls) or BeforeRender

Hand Struct

Hand data is a struct filled by the hand tracking subsystem and its hand tracking providers. Both hands data can be retrieved by calling LeftHand and RightHand on the subsystem reference.
See LeftHand and RightHandin XR Hand Tracking Subsystem above.

Non-StaticDescription
XrHandedness HandednessHand handedness. It can be XR_HAND_LEFT or XR_HAND_RIGHT
XrSpace SpaceSpace in which joint data are stored. It can be XR_HAND_LOCAL or XR_HAND_WORLD (in XR Origin)
bool IsTrackedTrue if the hand is currently tracked
float ScaleHand scale from .5f to 1.6f
Pose RootHand root pose (equivalent to the wrist center pose in XR Origin)
Pose[] JointsHand joint poses
Pose GetHandJoint(XrHandJoint joint)Returns a particular joint pose

XR Hand Tracking Manager

XR Hand Tracking Manager is the component which handles the hand tracking visualisation's part. It is responsible for instancing hand prefabs by listening the hand tracking subsystem events.

StaticDescription
GameObject DefaultLeftHandPrefabReference to the default Left Hand prefab in resources folder. Packages > Prefabs > Resources > QualcommHandLeft
GameObject DefaultRightHandPrefabReference to the default Right Hand prefab in resources folder. Packages > Prefabs > Resources > QualcommHandRight
XRHandTrackingManager InstantiateHandTrackingManager()Instantiate a Hand Tracking Manager with Default Hand prefabs
XRHandTrackingManager GetOrCreate(GameObject leftHandPrefab, GameObject rightHandPrefab)Gets existing or creates a Hand Tracking Manager if it doesn't exist with Hand prefabs given in parameters
void Destroy(XRHandTrackingManager manager)Destroys a given Hand Tracking Manager instance or tries to find one to destroy if it does exist
Non-StaticDescription
GameObject LeftHandPrefabLeft prefab object that will be instantiated
GameObject RightHandPrefabRight prefab object that will be instantiated
void RefreshLeftHand()Regenerates the left hand object if the prefab has changed
void RefreshRightHand()Regenerates the right hand object if the prefab has changed
HandSkin LeftHandSkinChange or retrieve the left hand skin
HandSkin RightHandSkinChange or retrieve the right hand skin
void ToggleHand(XrHandedness handedness, bool visible)Toggles the hand visibility
bool TrySetHandPose(XrHandedness handedness, HandData? data, HandMask? mask)Attempts to apply a custom hand pose on the hand object
bool TrySetPoking(XrHandedness handedness, Vector3? pokePoint)Attempts to set a poke point for the hand object
bool TrySetVff(XrHandedness handedness, bool active)Attempts to activate Virtual Force Feedback system on the hand object