Skip to content

Your first headpat

The Headpat trigger's panel with 1 its anchor on the Head bone, 2 the Hand and Finger tags ticked, and 3 a Blush row at weight 100.123

In the picture, 1 is the Anchor, the bone the touch area follows. 2 is Touched by, the body parts that count as a touch. 3 is the blend shape the trigger fades in.

At the end of this page your avatar blushes when a hand comes close to the top of its head.

  • An AvatarDoc component on your avatar, as in Your first toggle.
  • The inspector in Advanced mode, the default. Simple mode cannot add triggers: Simple or Advanced? explains the modes.
  • The avatar's Animator set to Humanoid, with an Avatar assigned, so AvatarDoc can find the Head bone.
  • A blush blend shape on the avatar's face. This page uses one named Blush.
  1. In the Hierarchy, select the object that holds your AvatarDoc component.

  2. In the inspector's toolbar, press + More, then + Contact. On a wide inspector, it sits on the toolbar itself.

    You should now see Headpat, Eye touch and Nose boop.

  3. Pick Headpat.

    You should now see a trigger named Headpat, selected under Triggers in the tree. In its panel, Mode is Fade, so the effect grows as a hand comes closer. The Anchor is the Head bone, and Touched by has Hand and Finger ticked.

  4. In the panel's Blendshapes section, press the shape button of the row. It shows the name of your face mesh.

    You should now see a list of blend shapes, with a search field.

  5. Type Blush and pick your blush shape.

    You should now see the row show the blush shape, with Weight at 100.

  6. In the Scene view, look at the top of the avatar's head.

    You should now see the trigger's sphere there, with handles to move it and to change its size.

Before Play mode, you can pat the head with a test hand in the Scene view. It changes only the scene preview, never the avatar.

  1. In the Headpat panel, press Test with a hand. It sits under the Scene preview row.

    You should now see a white sphere in the Scene view, just in front of the trigger's sphere.

  2. Drag the white sphere into the trigger's sphere on top of the head.

    You should now see the trigger's sphere turn green and the avatar blush, more and more as the hand comes closer to the middle.

  3. Press Stop.

    You should now see the avatar without the blush again.

If the avatar does not change, the scene preview is off: Scene preview says how to turn it on. Try it with a test hand shows what else the hand can do.

With Gesture Manager:

  1. Enter Play mode with Gesture Manager, as in Your first toggle.
  2. In the GestureManager inspector, open the Tools tab.
  3. Unfold Clickable Contacts and tick Enabled.
  4. In the Game view, click and hold on top of the avatar's head.

The avatar blushes while you hold. If the Game view does not show the avatar, unfold Scene Camera in the same tab and press its button: the Game view then follows the Scene view.

You can also upload the avatar and pat its head in VRChat. Self and Others are both on, so your own hands count as well as other players' hands.

Simple or Advanced?: see what each inspector mode shows, and switch between them.

To give the avatar a face for each hand gesture, with face tracking in mind, see Facial expressions on hand gestures.

Docs for AvatarDoc 0.7.1