# Basic Scene Setup

AR Session and AR Session Origin

If required, Hand Tracking also supports AR Foundation 4.X's AR Session and AR Session Origin as described here.

# XR Origin

First, create an XR Origin in the scene as explained here (opens new window).

After creating an XR Origin game object, unfold its hierarchy to view the Left Controller and Right Controller.

XROrigin architecture

Each of the two game objects include an XR Controller component which is not mapped to any input actions by default. These two components may be deleted at this point, as they are not used.

Then, add an XR Hand Tracking Manager component on the XR Origin (or the AR Session Origin) game object.

XR Hand Tracking Manager

# XR Hand Tracking Manager


It is possible to create an instance of an XR Hand Tracking Manager through code by using the GetOrCreate static public API on the XR Hand Tracking Manager class. See the XR Hand Tracking Manager API.

This component is required to visualize the hand models. It listens XR Hand Tracking Subsystem events at runtime and set user's tracked hand position referred to the XR Origin (It supports both XR Origin and AR Session Origin). At runtime the Hand Tracking Manager will instantiate left and right hand prefabs and gracefully fade them in and out based on the tracking status of the user's hands.

Add a Hand Tracking Manager to your scene by right-clicking in the scene's Hierarchy and selecting QCHT > Hand Tracking Manager.

QCHT Manager

# In Editor Simulation

To enable the Hand Tracking simulator, check the simulation subsystem in the XR Plug-in Management > Hand Tracking Simulation section of Unity's Project Settings.

It will also import and enable the XR Interaction Toolkit Device Simulator (opens new window) as the Hand Tracking simulator is built on top of it.

Hand Tracking simulation settings

Ensure, the Use XR Device Simulator in scenes is enabled in the XR Interaction Toolkit section of the Project Settings.


This settings needs to be disabled before building the application to the target platform.
Since QCHTI 4.1.2 this setting will be automatically unchecked before the build process.

XRIT simulation settings

To learn how to use the simulator, refer to the XR Interaction Toolkit Device Simulator documentation (opens new window).


When playing the scene in editor, you can quickly switch from head to left/right hand by pressing the tab key of your keyboard.

XRIT simulator in play mode