Skip to main content
Version: 0.23.2

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
XrHandGesture GestureGesture detected by hand tracking back-end
float GestureRatioDetected gesture's ratio from 0f to 1f
float FlipRatioHand flip ratio from -1f to 1f respectively weither the palm orientation is turned opposite to HMD position or toward
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
void ToggleLeftHand(bool visible)Toggles the left hand visibility
void ToggleRightHand(bool visible)Toggles the right hand visibility
void SetLeftHandSkin(HandSkin skin)Sets the left hand skin if the hand object is skinnable
void SetRightHandSkin(HandSkin skin)Sets the right hand skin if the hand object is skinnable