State Machine is the brain of interactive animations. While the regular Timeline plays an animation from start to finish, the State Machine lets your animation think, pause, and react to user interactions, like moving the mouse or clicking.
To use the State Machine, select a node in nodegraph and open the State Machine view in the Timeline panel.
Core concepts
- States (nodes): a state is what the object is doing right now. For example, a button might have an
Idlestate (doing nothing), aHoverstate (growing larger), and aClickstate (shrinking). Each state plays a specific Animation Clip. - Transitions (arrows): these are the paths between states. They tell the animation how and when to get from one action to the next, and can smoothly crossfade between states if an animation is interrupted midway.
- Variables (rules): variables act as sensors. The system automatically tracks built-in variables like
hoverandclick. If the user hovers over a shape named “Star”, thehovervariable changes to “Star”. Transitions use these variables to decide if they are allowed to move to the next state.
Entry point
Every State Machine has an Entry node. When the animation begins, it instantly travels out of the Entry node following the connected arrow. The state it points to becomes your “Starting State” (usually an Idle or default resting state).
Built-in variables
State Machine automatically tracks user interactions with canvas shapes. You can use these in your transition conditions:
hover: contains the ID or Label of the shape the mouse is currently resting on.click: contains the ID or Label of the shape that was just clicked.pointerdown: contains the ID or Label of the shape being pressed down on.pointerup: contains the ID or Label of the shape where a press was released.
Tip: You can also create your own custom variables by clicking the `+` button in the Variables sidebar.
Shortcuts
| Timeline view | 1 |
| Dope sheet view | 2 |
| Graph editor view | 3 |
| State machine view | 4 |
| Next frame | Right Arrow |
| Previous frame | Left Arrow |
| Next keyframe | Ctrl Right Arrow |
| Previous keyframe | Ctrl Left Arrow |
| Zoom view | MMB Scroll |
| Pan view | MMB Drag |
| Box select nodes and edges | LMB Drag |
| Add to selection with a box | ShiftDrag |
| Remove from selection with a box | AltDrag |
| Fit graph view | ShiftF |
| Delete selected keyframes | Del |
| Lock keyframe movement to vertical or horizontal axis | ShiftDrag |
| Lock handle to vertical or horizontal axis | ShiftDrag |
| Lock handle to initial angle | CtrlShiftDrag |