Head Shake Patch

Use the Head Shake patch to make something happen when the user moves their head from left to right or right to left and returns to the center.

A head shake is only detected if the head moves within 45 degrees from one direction to the other before returning to the center.

Input

NameDescription

Face

Track the user’s face from the face tracker.

Output

NameDescription
Output

Output the value to the next patch.

Example

We configured the graph below to make an object appear when the user shakes their head and disappear when the user shakes it again.

To do this, we connected:

  • The Shake output on the Head Shake patch to the Flip input on the Switch patch.
  • The On/Off output on the Switch patch to the Visible input on the object patch.
Was this article helpful?