Your First Project: Hello Hands¶
In this example project, you'll learn how to set up Ultraleap Hand Tracking in a fresh Unity project.
This example assumes that you already understand the Getting Started with Unity steps.
Prerequisites¶
Ensure you have read and understand the Getting Started with Unity prerequisites
Make an XR scene with Hand Tracking¶
The following steps are sufficient to see your first set of tracked hands in Unity.
Create a new 3D project in unity.
Create a new scene and name it appropriately.
Import the Ultraleap tracking package as described in Getting Started with Unity
Add an XR Leap Provider Manager prefab to the scene. This provides hand tracking data to the application. Provider prefabs can be found via the toolbar under
Ultraleap > Tracking > XR Leap Provider Manager
. The Leap Provider Manager will automatically choose between using the LeapC and OpenXR service providers.
Note
If you wish to use OpenXR, be sure to import the OpenXR Unity Package
From the same toolbar menu as before, add a set of hands to the scene as a child of the XR Leap Provider Manager. The Hand Prefabs can be found under
Ultraleap > Hands
. The plugin provides a few different hand visuals, add which ever hands you would like to use.
There is a selection of rigged (mesh) hands, including low polygon hands, outline hands and the iconic capsule hands.
Note
You can check out the other hands we include in the plugin here: Hand Prefabs and if you want to rig your own hands (advanced), check out the rigging guide here: Rigging your own hands
Add Unity’s XR Origin to the scene to position the scene camera relative to the XR device.
Note
This makes use of Unity’s XR Core Utilities Package features
Press Play, or follow the build instructions on your chosen platforms own docs (e.g. if targeting an Android headset).
If you want to do more with your virtual hands, i.e. interact with objects or access hand data in a script, it’s worth reading the relevant documentation in Features.
Building¶
Ultraleap does not have any specific build requirements so you can build this project for any platform. Just be sure to follow your chosen platforms steps for building the project.
Troubleshooting¶
If you do not see your hands in Unity, check the following:
Make sure you have the correct “Provider” in your scene. Provider prefabs are suffixed Desktop, Screentop, or XR. If you are using the XR Provider, make sure you have the camera referenced.
If you are using a custom camera or controller rig, check your application’s scene hierarchy while your hand is in front of the sensor. Make sure the hand isn’t simply being rendered in the wrong place relative to your camera.
Check the Ultraleap Tracking Icon in your task bar. If it has a red circle overlay this means the Ultraleap Tracking Service isn’t sending any data. Double-check that your Ultraleap Hand Tracking Camera is plugged in, and check that the Ultraleap Tracking Service is running.
Open the Ultraleap Visualizer from the right-click menu of the Ultraleap Tracking Icon in your task bar. If you see hands in the Visualizer, the problem is likely somewhere in Unity.
Need additional support? Get in touch we’d be happy to help.
What’s next?¶
Now that you have had your first taste of hand tracking in Unity, why not try out our features.
Some of the exciting features that the plugin has to offer!