You can use a hand tracker to create effects that respond when the camera detects a hand.
In this tutorial, you'll learn to add hand tracking to an effect, by.
Download the sample content to follow along. In the finished effect you'll see that when you wave your hand, it looks like you're holding a baseball.
To see what an effect with hand tracking looks like, you'll need to switch on your computer's camera. This will let you see your own hands in the Simulator when it comes to testing out the hand tracking effect.
To do this:
Start by adding a hand tracker to the scene:
In the Simulator, you'll see an instruction saying Hold up a hand!.
This is an automatic instruction that's added to all effects with a hand tracker. If you hold up a hand, the message will disappear. Find out more about adding instructions.
We've already added a 3D object to the project. It's listed in the Assets panel as baseball. The object looks like, you guessed it, a baseball.
You could try out hand tracking with another object if you wanted - there are lots to choose from in the AR Library.
To make the object appear in response to a hand, the object should be a child of the hand tracker in the Scene panel. When an object is a child of another object in Spark AR Studio, it'll respond to its parent object - in this case, appearing when a hand is detected.
To create a child-parent relationship, all you need to do is drag one object onto another in the Scene panel:
You can drag the baseball object directly from the Assets panel, onto the hand tracker in the Scene panel. This will add the object to the scene at the same time as creating the relationship with the hand tracker.
Because the object is a child of the hand tracker, it's nested underneath it in the Scene panel.
And there you have it, an effect with hand tracking!
Change someone’s environment with segmentation and the camera texture.
Distort the face with a blendshape and add a retouching material.