Clear
Back

Hand Tracker

Use the hand tracker to create an effect that responds to someone's hand.

You can only add one hand tracker to a scene. For effects with a hand tracker to work, the hand needs to be quite close to the camera.

If your effect has a hand tracker, an instruction saying Hold up a hand! will appear until a hand is detected.

Learn about:

Adding a hand tracker

To add a hand tracker:

  1. Click Add Object.
  2. Select Hand Tracker.
  3. Click Insert.

It's a good idea to switch the video in the Viewport and Simulator to your own camera, so you can hold up a hand to see your effect working. Click Video in the toolbar, then select the name of your camera - for example FaceTime HD Camera.

Tracking an object to a hand

To make an object appear on the hand, all you need to do is make the object a child of the hand tracker in the Scene panel. To do this, either:

  • Right-click on the hand tracker in the Scene panel, and select 3D Object.
  • Drag an object from the Assets panel or your desktop, straight onto the hand tracker in the Scene panel.

Learn more in this tutorial.

Hand tracker properties

When you've selected the hand tracker in the Scene panel, you'll see its properties in the Inspector on the right of your screen.

Adjust these properties to make changes to the hand tracker.

When you see a small arrow next to a property you can click it to create a patch representing the property in the Patch Editor.

Layer

Assign the hand tracker to a layer, or create a new one.

Visible

Uncheck this box to stop the hand tracker and any children from being rendered in the scene.

Transformations

You can't change the position, scale or rotation of a hand tracker, because these values are controlled by the position of the face detected by the face tracker.

Interactions

Insert simple combinations of patches into the Patch Editor.

Enable For

Choose the camera or cameras on a mobile device that you want to render the hand tracker and its children in.

Creating a patch to represent the hand tracker

You can create a patch representing the hand tracker by dragging it from the Scene panel, to the Patch Editor.

Three patches will be created:



  • Hand Finder - finds all hands in the current camera frame. At the moment, only one hand can be detected.
  • Hand Select - selects the hand you want to track, from the Hand Finder patch.
  • handTracker0 - outputs the 3D position of the hand that's being tracked.

Using scripting

You can use scripting to achieve other effects with a hand tracker - for example, assigning an object's coordinates to the hand.

For scripting the object should be dragged into Camera and out of the Focal Distance.

Join the Spark AR Creator's community

Find inspiration, see examples, get support, and share your work with a network of creators.

Join Community

Join the Spark AR Creator's community

Find inspiration, see examples, get support, and share your work with a network of creators.

Join Community

Frequently asked questions

Have a specific question? Maybe it's been answered.


Read FAQs
Was this document helpful?