【Unreal Engine】Animation Blueprint Basics: State Machine and Blend Space Usage

Created: 2025-12-12

Basic structure of Animation Blueprint for controlling character animation. Covers state transition management with State Machine, smooth animation interpolation with Blend Space 1D/2D, and role division between Event Graph and Anim Graph.

Why Animation Blueprint is Needed

When starting to move characters in Unreal Engine, are you facing problems like these?

  • The transition from "Idle" to "Walk" looks unnatural, with animation seeming to suddenly jump.
  • Switching between "Walk" and "Run" animations requires tons of complex Branch nodes, making the Blueprint messy.
  • Not knowing how to combine special actions like jump and attack with movement animation.

These problems can be dramatically improved by understanding the roles and proper usage of State Machine and Blend Space in Unreal Engine's animation system core—Animation Blueprint (AnimBP).

This article thoroughly explains how these two powerful tools work together to achieve smooth, efficient professional-quality character animation, with concrete Blueprint examples for UE beginners to intermediate developers.

What is Animation Blueprint

Animation Blueprint is a special Blueprint that controls which animation to apply to the character skeleton at what timing, with what blend (mixing).

AnimBP mainly consists of two graphs:

  1. Event Graph: Processes to get gameplay information like character speed and whether jumping, and pass those values to animation logic.
  2. Anim Graph: Constructs logic that blends animations, places State Machines, and determines the final pose.

Within this Anim Graph, State Machine manages character "states" and Blend Space manages "smooth transitions within states."

State Machine Basics and Role

State Machine is a mechanism that defines what "state" the character is currently in and manages "transitions" between states.

What is a State

A state refers to a specific action pattern of the character. For example, these are defined as states:

  • Idle/Run: State of moving on the ground
  • Jump: State of being in the air
  • Attack: State of performing an attack
  • Death: State of being dead

What is a Transition

A transition defines the "condition" for switching from one state to another.

For example, the condition to transition from "Idle/Run" state to "Jump" state is "when IsInAir variable becomes True." Conversely, the condition to return from "Jump" state to "Idle/Run" state is "when IsInAir variable becomes False (when landing on ground)."

💡 Difference Between IsFalling and IsInAir

Character Movement Component's IsFalling() returns True only during falling (False during rising). To detect the entire jump (rising + falling), use the negation of IsMovingOnGround() (!IsMovingOnGround()) or manage your own IsInAir variable.

[State Machine Best Practice]

State Machine is optimal for cases where actions are fundamentally different, or abnormal (abrupt) switching is needed.

State Transition ExampleAppropriate Reason
Idle/Run → JumpAction pattern fundamentally changes from "ground" to "air"
Any State → DeathHigh-priority state change that should occur immediately
Idle → AttackMovement logic needs to pause during attack

💡 About Death State Design

Transitions like "Any State → Death" are often treated specially as a final state with no revival in many projects. Not having transitions from Death state to other states (or only allowing transition on "revival" event) is a common design.

Blend Space Basics and Role

Blend Space is a mechanism for defining multiple animations within one asset and smoothly mixing (blending) them based on specific input values (parameters).

1D and 2D Blending

There are mainly two types of Blend Space:

  • Blend Space 1D: Blends animations based on one parameter (e.g., speed).
    • Example: Place Idle animation at speed 0, Walk at speed 300, Run at speed 600, and smoothly transition based on speed.
  • Blend Space (2D): Blends animations based on two parameters (e.g., speed and direction).
    • Example: Blend movement speed and movement direction relative to character facing (forward, back, left, right) to achieve 8-directional or strafe movement.

💡 How to Get Movement Direction

The "Direction" used in 2D Blend Space can be obtained with the Calculate Direction node. This node calculates movement direction from -180 to 180 degrees from the Velocity vector and character facing (Rotation). For strafe movement (where character facing and movement direction are independent), you need to turn Orient Rotation to Movement Off in Character Movement Component.

How Blend Space Works

When creating a Blend Space asset, set parameter ranges (e.g., Min 0, Max 600) on the X-axis (and Y-axis for 2D). Just placing corresponding animations (e.g., Idle, Walk, Run) on this grid makes Unreal Engine automatically interpolate (blend) between them.

💡 About Interpolation Settings (Axis Settings)

Blend Space's Axis Settings lets you set Interpolation Time. Adjusting this value controls how smoothly animation follows sudden input changes. Smaller values respond immediately, larger values are smoother.

[Blend Space Best Practice]

Blend Space is optimal when smooth changes within the same action category are needed.

Action Change ExampleAppropriate Reason
Idle ↔ Walk ↔ RunSmooth change with single parameter (speed) within same ground movement category
Aiming (up/down/left/right)Smoothly mix upper body poses with two parameters (Pitch and Yaw)

State Machine and Blend Space Cooperation

State Machine and Blend Space aren't opposing—using them together builds the most efficient animation structure.

Basic Structure

The most common character animation structure is:

  1. State Machine switches character's broad states (ground movement, jump, attack, etc.).
  2. Place Blend Space inside "states" like "ground movement."
  3. Blend Space handles smooth changes within that state (Idle ↔ Run).

This clearly divides roles: State Machine handles abrupt state changes like "jump" while Blend Space handles smooth changes like "walking speed variation."

Practical Blueprint Examples

Here we'll look at basic Anim Graph composition for controlling character ground movement (Idle ↔ Run).

Step 1: Get Required Variables in Event Graph

First, get character speed and jump state in Event Graph and store them in AnimBP variables.

Blueprint (Event Graph) Example:

// 1. Try Get Pawn Owner (get owner Pawn)
// 2. Is Valid (check if Pawn is valid)
// 3. Get Velocity (get velocity vector)
// 4. Vector Length (calculate vector length = speed)
// 5. Set Speed (set calculated speed to AnimBP float variable 'Speed')
// 6. Get Character Movement Component
// 7. Is Moving On Ground (check if grounded)
// 8. Invert with NOT node to get IsInAir
// 9. Set IsInAir (set result to AnimBP bool variable 'IsInAir')

Step 2: Build State Machine in Anim Graph

Place a State Machine node in Anim Graph and define basic "ground movement" and "jump" states.

State Machine Composition:

  1. EntryIdle/Run (initial state)
  2. Idle/RunJump Start (transition condition: IsInAir is True)
  3. Jump StartIdle/Run (transition condition: IsInAir is False)

Step 3: Place Blend Space Inside Idle/Run State

Double-click the "Idle/Run" state to enter it and place the created Blend Space 1D asset (e.g., BS_Idle_Walk_Run).

Blueprint (Inside Idle/Run State) Example:

// 1. Place Blend Space 1D asset (BS_Idle_Walk_Run)
// 2. Connect 'Speed' variable from Event Graph to Blend Space input pin
// 3. Connect result to Final Animation Pose

This simple structure has State Machine handle the big decision "on ground or in air" while Blend Space handles "smooth animation based on speed while on ground."

Common Mistakes and Best Practices

Common Mistakes

MistakeDescriptionSolution
Blend Space OveruseTrying to force blend abrupt action changes like jump or attack with Blend Space.Should switch states with State Machine. Blend Space is only for smooth transitions within same category.
Complex Transition ConditionsWriting tons of nodes or complex calculations directly in State Machine transition rules.Keep transition conditions simple; do complex calculations in Event Graph and pass results as variables.
Confusing with MontageTrying to handle temporary, interruptible animations like attacks or taking hits with State Machine alone.For temporary actions like attacks, taking hits, opening doors—use Anim Montage and play on a layer above State Machine.

Best Practices

  1. Thoroughly Divide Event Graph and Anim Graph Roles:
    • Event Graph: Get information from game logic (speed, input, state) and store in variables for Anim Graph.
    • Anim Graph: Use passed variables to build animation logic with State Machine, Blend Space, etc.
  2. Use State Machine for "Abnormal Changes":
    • Limit to parts where action nature changes significantly: ground ↔ air, normal ↔ death, normal ↔ attack, etc.
  3. Use Blend Space for "Smooth Changes":
    • Use only when interpolating animations based on continuous values like speed, direction, aiming angle.

Key Points for Animation Blueprint Utilization

This article explained the basic roles of State Machine and Blend Space in Unreal Engine's Animation Blueprint, and how to combine them to build efficient animation logic.

ElementRoleOptimal Use Case
State MachineDefine character's broad states and manage abrupt transitions.Ground movement ↔ Jump, Normal ↔ Death
Blend SpaceWithin the same state, smoothly mix multiple animations based on input values.Idle ↔ Walk ↔ Run, aiming up/down/left/right movement

Correctly understanding and appropriately using these two concepts is the key to achieving professional-quality character animation in Unreal Engine. Start by creating a simple Idle/Walk/Run Blend Space and incorporating it into a State Machine.

Now, let's graduate your character from "choppy" movement and breathe life into them!