Basic Interaction Setup
Once the basic scene setup is complete, the user is now able to visualize their hands, but they cannot yet interact with the virtual environment around them. Perform the basic setup for hand tracking interactions described below to enable it.
Scene Architecture
Visualisation
After creating an XR Hand Tracking Manager
, two prefabs are automatically set up on the left and right hand fields. These prefabs are for hand visualisation purpose only.
Hand prefab GameObjects have Hand Rigged Visualizer and Hand Driver components which are in charge of visualizing the hand mesh and updating hand joint transforms for the Skinned Mesh.
Interactions
QCHT interactions are fully based on XRIT package.
Interaction profiles
QCHTi supports Hand Interaction Profile and Microsoft Hand Interaction Profile
If no interaction profile is selected or the runtime does not support interaction profiles, QCHTIi will fallback to a custom Hand Tracking Input Device which will register itself as XR Controller in input system device map.
Available controls when fallback are :
Unity Control Name | Type | Aliases |
---|---|---|
isTracked | Boolean | |
trackingState | Flag | |
devicePosition | Vector3 | |
deviceRotation | Quaternion | |
pokePosition | Vector3 | |
pokeRotation | Quaternion | |
pinchPosition | Vector3 | |
pinchRotation | Quaternion | |
graspPosition | Vector3 | |
graspRotation | Quaternion | |
pointerPosition | Vector3 | |
pointerRotation | Quaternion | |
trigger | Float | select |
triggerPressed | Boolean | selectPressed, triggerButton |
grip | Float | squeeze |
gripPressed | Boolean | squeezePressed, gripButton |
Controllers
From scratch, to enable interactions like Distal Interaction and Proximal Interaction, custom XRIT controllers for hands have to be added.
Add the Hand Tracking Controllers GameObject to the scene by right-clicking in the scene's Hierarchy and selecting QCHT > Hand Tracking Controllers.
Two instances of hand tracking controllers are automatically added as children of XR Origin (or AR Session).
Each controller aggregates the XR Ray Interactor, the XR Poke Interactor and two XR Direct Interactor components with predefined setup. These components are highly configurable.
However input action mapping is not pre-setup on these controllers.
Binding direct input actions or creating an Input Action Map Asset is required.
It is highly recommended to use the QCHTi Samples Core Assets to get a full predefined XR Rig setup with a default input action mapping.