State Machine is the brain of interactive animations. While the regular Timeline plays an animation from start to finish, the State Machine lets animation think, pause, and react to the 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): state is what 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 paths between states. They tell the animation how to get from one action to the next.
- Variables (rules): variables are sensors. The system automatically tracks variables like
hoverandclickand auto suggests them. 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 Entry node. When animation begins, it instantly travels out of the Entry node following the connected arrow. The state it points to is “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 |