State Machines are modular systems you can build in Animation Blueprints in order to define certain animations that can play, and when they are allowed to play. Primarily, this type of system is used to correlate animations to movement states on your characters, such as idling, walking, running, and jumping. With State Machines, you will be able to create states, define animations to play in those states, and create various types of transitions to control when to switch to other states. This makes it easier to create complex animation blending without having to use an overly complicated Anim Graph.

This document provides an overview of how to create and use State Machines, states, and transitions in Animation Blueprints.

Prerequisites

Creation and Setup

State Machines are created within the Anim Graph. To create one, right-click in the Anim Graph and select State Machines > Add New State Machine. Connect it to the Output Pose.

State Machines are subgraphs within the Anim Graph, therefore you can see the State Machine graph within the My Blueprint panel. Double-click it to open the State Machine.

<aside> 💡 You can also double-click the State Machine node in the Anim Graph to open it.

</aside>

Entry Point

All State Machines begin with an entry point, which is typically used to define the default state. In most common locomotion setups, this would be the character idle state.

To create the default state, click and drag the entry output pin and release the mouse, which will expose the context menu. Select Add State. This will create the new state and connect it to the entry output, making this state active by default.

States

States are organized sub-sections within a State Machine that can transition to and from each other regularly. States themselves contain their own Anim Graph layer, and can contain any kind of animation logic. For example, an idle state may just contain a character's idle animation, whereas a weapon state may contain additional logic for shooting and aiming. Whatever logic is used, the purpose of a state is to produce a final animation or pose unique to that state.

Creating States

States can be created in the following ways: