[UE5] Animation Blueprint Basics: Wiring Idle, Walk, Run, and Jump with State Machine and Blend Space

Created: 2025-12-12Last updated: 2026-09-06

An introduction to changing animation with movement speed and airborne state in UE5's Animation Blueprint. Sorts out what State Machine and Blend Space each do, then builds idle, walk, run, and airborne motion with Third Person assets.

Once you can move a character, you want the visuals to match. Stand still and it idles, move slowly and it walks, move fast and it runs. And when you jump, it switches to an airborne pose. Before writing all of that as one branch after another, let's sort out the tools for assembling animation.

Here, a State Machine picks "grounded or airborne," and on the ground a Blend Space decides "how much walk and run to mix." Using the Third Person template character, we build up to visuals that change with speed and ground contact.

State Machine switches states, Blend Space mixes by value. An image of using the two roles separately

What You'll Learn

  • Separating the Animation Blueprint's "graph that gathers values" from its "graph that builds poses"
  • Mixing idle, walk, and run according to speed
  • Switching to an airborne pose on jump and returning to ground on landing
  • Confirming the mix by changing speed, even on a keyboard

Sponsored

An Animation Blueprint builds visuals to match the motion

An Animation Blueprint (AnimBP) is a Blueprint that assembles which animation to use based on the character's situation. A pose here means the body's posture at a given moment. The AnimBP plays and blends animations to build a pose, then hands it to the character's Mesh.

Movement itself is handled by the template's Character Movement. The AnimBP reads "how fast am I moving right now" and matches the arms and legs to it. Choosing a run animation and making the character move fast are two different things.

The two graphs you see when you open an AnimBP make sense in that light.

GraphWhat we do here
Event GraphGet speed and airborne state from the character and store them in variables
Anim GraphUse those variables to decide the pose to display
Gathering Speed and bIsInAir from the game side, then deciding the pose in the Anim Graph

Start by thinking of it as separating the work that gathers values from the work that assembles the look. Rather than computing "am I airborne" in several places, storing it in one variable in the Event Graph keeps the later conditions readable.

State Machine picks the state, Blend Space sets the ratio

State Machine: grounded, or airborne?

A State Machine is a diagram of states and the conditions for moving between them. Here we create two states, Grounded and InAir.

The arrows connecting states are Transitions. You set a condition on each arrow: "go from Grounded to InAir when airborne," "come back on landing." Even as states multiply, you can follow on the diagram where you can go from where.

Blend Space: set the mix that fits the speed

While on the ground, you want the look to change with movement speed. That is what a Blend Space is for: an asset that mixes several animations according to a value.

Small speed leans toward idle or walk; larger leans toward run. This continuous change is driven by one number. The "1D" in the Blend Space 1D we use here means it takes one input value, such as speed.

The two combine like this.

  • State Machine on the outside: switches between grounded and airborne
  • Blend Space inside Grounded: mixes idle, walk, and run according to grounded speed
  • Inside InAir: plays the airborne animation
The nested structure with a Blend Space inside the State Machine's Grounded state, switching Grounded and InAir on the outside

Note that a State Machine also blends the before and after poses smoothly while a state change is in progress. Think of it as State Machine handling "the condition to move to the next state," and Blend Space handling "the mix ratio for a value," and you are less likely to confuse their roles.

Preparation: gather assets for the same character

Prepare a Blueprint Third Person template project where you can move and jump. Below we use the template's Manny and its animations.

Match the character and the animations

Open BP_ThirdPersonCharacter and set the Mesh component's "Skeletal Mesh Asset" to SKM_Manny. A Skeletal Mesh is a model whose body deforms with a skeleton.

The information about that skeleton is the Skeleton. Even two similar-looking humanoids may not be able to share animations if their Skeletons differ. Here we align the Mesh, the animations, and the AnimBP we are about to build on the same Manny Skeleton.

Skeletal Mesh, Animation Sequence, and Animation Blueprint all pointing at the same Skeleton

In the content browser under Characters/Mannequins/Animations/Manny, confirm the following assets. Folders and names may differ by template version.

PurposeExample asset nameWhat to confirm in the preview
IdleMM_IdleStands in place
WalkMM_Walk_InPlaceRepeats a walk in place
RunMM_Run_FwdA forward run
AirMM_Fall_LoopRepeats an airborne pose

Double-click each asset and play it to check the motion. What we use here are Animation Sequences, animation assets that each hold one motion. Even for the same purpose, avoid picking one built for a different Skeleton, or a short jump-start clip.

If the names differ, choose by matching against the purpose above and the asset's Skeleton. If you cannot find what you need, install the Third Person content first. Using assets built for a different character is covered in Animation Retargeting Basics.

Decide the speeds to compare

In BP_ThirdPersonCharacter's Character Movement, set Max Walk Speed to 500. This is the upper limit for normal grounded movement here. In UE's default units it corresponds to 500 cm/s.

In the Blend Space that follows, we place idle at 0, walk at 150, and run at 500. The point is to use the same numbers for the actual speed you feed in and the positions where you place animations. The 150 and 500 here are values chosen for this exercise.

Start by mixing animations by speed

  1. Right-click in the content browser and choose "Animation" → "Blend Space 1D."
  2. Choose the same Skeleton as Manny's assets and name it BS_Locomotion.
  3. In the window that opens, under "Asset Details" → "Axis Settings," set the axis name to Speed, Minimum Axis Value to 0, and Maximum Axis Value to 500.
  4. Drag animations onto the following positions. To place them precisely, select a placed sample and edit its coordinate.
Speed positionAsset to place
0MM_Idle
150MM_Walk_InPlace
500MM_Run_Fwd

Each placed point is called a sample. It marks "at this speed, use this animation."

Hold Ctrl and move the mouse in the graph to preview the mix at that position. 0 is idle, 150 is walk, 500 is run. 325 sits exactly between 150 and 500. Park the cursor at 325 and you settle into a half-walk, half-run motion.

Speed samples with Idle at 0, Walk at 150, Run at 500, previewing the walk-run midpoint at 325

At this point you have confirmed that one number — speed — can produce different motion. Next we feed the in-game speed into the Speed you were moving by hand.

Sponsored

Hands-On: wiring movement and air into one AnimBP

1. Create the AnimBP and its variables

Right-click in the content browser and choose "Animation" → "Animation Blueprint." Set the parent class to AnimInstance and the Skeleton to the same one as before, and create ABP_Player.

AnimInstance is the base class for driving a character's animation. In the AnimBP built on it, prepare these variables.

VariableTypeDefaultWhat it holds
SpeedFloat0Horizontal movement speed
bIsInAirBooleanfalseWhether we are airborne this update

Float is a number with decimals; Boolean is true or false. The leading b in bIsInAir is a marker that makes it clear the variable is a Boolean.

From here, drag a variable into the graph and choose "Get" or "Set." Get reads the value, Set writes it. Doing so does not add a new variable.

2. Get the character that is using this AnimBP

In the Event Graph, connect a white exec line from Event Blueprint Update Animation to Cast To Character. Update Animation is the entry point called each time animation updates. Starting here means values are re-read while moving.

Next place Try Get Pawn Owner and connect its "Return Value" to Cast To Character's "Object." Try Get Pawn Owner retrieves the Pawn using this AnimBP. A Pawn is a body that gets controlled; a Character is a kind of Pawn with movement and jumping built in.

Cast checks whether the retrieved object can be treated as a Character. On success, As Character gives you that object, so you can read speed and Character Movement.

Try Get Pawn Owner is a Pure node that returns a value. It has no white exec pin, only blue data connections. Run the exec line directly from Update Animation to Cast.

Connecting the exec line from Update Animation to Cast, and Try Get Pawn Owner's Return Value into Object

Leave "Cast Failed" unconnected here, which stops the value update. When only the editor preview is open, there may be no in-game Pawn. There is no need to Print String the failure every time.

3. Feed horizontal speed into Speed

From Cast's success output, connect an exec line to Set Speed. Build the value in this order.

  1. From Cast's As Character, pull Get Velocity. It retrieves "in which direction and how fast" that Character is moving.
  2. Connect Get Velocity's Return Value to Vector Length XY's "A."
  3. Connect Vector Length XY's Return Value to Set Speed's value.
From Cast's As Character through Get Velocity and Vector Length XY to update Speed

Velocity expresses speed per direction as three numbers X, Y, and Z. X and Y are horizontal, Z is vertical. A bundle of per-direction values like this is called a Vector. Vector Length XY takes the speed from just the two horizontal directions.

For example, jumping straight up gives you vertical speed without running along the ground. Using Vector Length, which includes Z, would fold that vertical movement into Speed. Since we use this value for walking and running feet, we narrow it to XY.

4. Feed the airborne state into bIsInAir

After Set Speed, connect Set bIsInAir.

From Cast's As Character, pull Get Character Movement, and from its output pull Is Falling. Pass Is Falling's Return Value into Set bIsInAir.

Getting Is Falling from Character Movement and updating bIsInAir after Set Speed

Despite the name, on this Character Is Falling is true both while rising from a jump and while descending. It is also true when you walk off a ledge. Unlike "the instant the jump button was pressed," it represents the state of being in the air.

Running on the ground raises Speed, while an in-place jump keeps Speed at 0 yet makes bIsInAir true

Following the exec line, it goes from Update Animation through Cast's success output, then Set Speed, then Set bIsInAir.

With speed and airborne state retrieved separately, you can now build poses from these two variables.

5. Place the State Machine and connect it to the output

Open the Anim Graph, right-click and choose "State Machines" → "Add New State Machine," and name it Locomotion.

Connect Locomotion's pose output to Output Pose. An Anim Graph only affects the character's display once the pose reaches the final output. The white exec lines in the Event Graph and these pose lines play different roles.

Connecting Locomotion's pose to Output Pose in the Anim Graph

Double-click Locomotion and add states from the right-click menu in empty space with "Add State." Create Grounded and InAir, and connect "Entry" to Grounded. That starts you in the grounded state.

Then drag from Grounded's outer edge to InAir to create a transition arrow. Create the reverse the same way. You need one arrow each way, out and back.

The two-state layout: Entry into Grounded, InAir when bIsInAir is true, back to Grounded when false

6. Set the conditions for both directions

Double-click a transition icon and a graph opens where you set that arrow's condition.

TransitionValue to connect to Can Enter Transition
Grounded → InAirGet bIsInAir
InAir → GroundedGet bIsInAir inverted with NOT Boolean

Can Enter Transition is the check for "may we move into this state?" When it becomes true, the transition can happen.

The NOT Boolean on the return side swaps true and false. It makes the return condition true when bIsInAir becomes false. Connect the same value straight to both arrows and "go when airborne" and "come back when airborne" both become satisfied.

Passing bIsInAir straight through on the way out, and inverted with NOT Boolean on the way back

Click a transition icon once and set "Details" → "Blend Settings" → "Duration" to 0.2 seconds in both directions. This is the time spent blending the before and after poses. Start from this value and tune it once you see the motion.

7. Build the contents of grounded and airborne

Double-click Grounded and drag BS_Locomotion from the content browser into the graph. That places a Player node that plays the Blend Space. Connect Get Speed to the "Speed" input and the pose output to Output Animation Pose. Select the BS_Locomotion node and turn on "Loop" in the Details so walk and run repeat.

Inside Grounded, feeding Speed into BS_Locomotion and connecting the resulting pose to Output Animation Pose

Inside InAir, drag MM_Fall_Loop from the content browser and connect it to Output Animation Pose the same way. Turn on "Loop Animation" in this node's Details as well.

Inside InAir, looping MM_Fall_Loop and connecting it to Output Animation Pose

Because we keep airborne as a single state here, the same air animation plays both while rising and while falling. Add dedicated takeoff and landing motions after the foundation is moving.

8. Assign it to the character

Select BP_ThirdPersonCharacter's Mesh and set the following.

SettingValue
Animation ModeUse Animation Blueprint
Anim ClassABP_Player

Compile and save ABP_Player and BP_ThirdPersonCharacter, then Play. Success looks like this: it idles when stopped, runs when moving, switches to an airborne pose on jump, and returns to ground on landing.

Because we replaced the template's existing AnimBP with this simpler setup, the original foot-planting correction and the like are not included. First confirm the mapping from state and speed.

Sponsored

Change the speed and confirm the mix

Keyboard movement accelerates hard while held, which can make the walk look hard to observe. Changing Max Walk Speed lets you compare without a gamepad.

Stop Play once, change the value in BP_ThirdPersonCharacter's Character Movement, and start again. Leave the Blend Space positions 0, 150, and 500 as they are.

Max Walk SpeedWhat it looks like after moving a while on flat ground
150Approaches the walk sample
325Lands between walk and run
500Approaches the run sample

Move at 325 and walk and run mix even while you hold the key down fully. That is because what the Blend Space looks at is the Speed value handed to it, not input strength or whether a run button was pressed. Once confirmed, set Max Walk Speed back to 500.

The 0, 150, and 500 positions placed in the Blend Space, and where walk and run mix when moving at 325

Try jumping both while moving and in place. Since the condition for going airborne is bIsInAir, a jump with zero horizontal speed still reaches InAir.

When it doesn't work

Stuck in a T-pose or standing stiff

Check that ABP_Player is assigned to the Mesh and that everything is aligned on Manny's Skeleton. Next, look at the Anim Graph's Locomotion → Output Pose connection and the connection to Output Animation Pose inside each state. Check for compile errors too.

Always idle, or never reaches Run

Play with the AnimBP open and use "Debug Filter" in the toolbar to select the running character's AnimInstance. Check Speed, and if needed place a temporary Print String after Set Speed to print the value.

If Speed stays 0, check the Cast success path and Get Velocity's Target. If the value changes but the look does not, check the Speed connection into BS_Locomotion. If Run sits at 500 but your actual speed is 150, you will never reach the run sample.

Never comes back from the air, or the switching is unstable

Check the bIsInAir update, the outbound condition, and the NOT on the return, in that order. Look for whether the return side connects bIsInAir straight through, or whether you only made one arrow.

If the air pose freezes partway, confirm the animation is a loop and that Loop Animation is on.

The switch snaps, or the feet slide

For the ground-to-air switch, look at the transition Duration; for speed changes on the ground, look at how the Speed entering the Blend Space changes and at sample positions. A Blend Space's Smoothing Time makes it follow input changes over time. It is worth trying when you want to soften abrupt changes, though longer values also slow the visual response.

For sliding feet, also check whether the animation's stride and playback rate match the actual movement speed. Blending correctly and feet planting firmly on the ground are two different things. 150 and 500 are practice values, so when you change assets, adjust while watching what speeds suit that motion.

Bonus: how to think about adding more motion

Split the air into takeoff, fall, and landing

The InAir here is a minimal setup playing one air pose. Prepare dedicated assets and split the state and you can connect takeoff, fall, and landing in finer detail.

When adding a state, think about what signals leaving it as well as when you enter it. Deciding whether a short takeoff plays all the way through, or whether landing returns you to the ground immediately, makes the arrow conditions easier to write.

Adding direction or attacks

If you want two inputs, speed and direction, a 2D Blend Space works. Strafing and walking backward need their own assets plus a decision about how to separate the character's facing from its movement direction. Speed alone in 1D cannot select a direction.

For temporary actions like attacks or hit reactions, Animation Montage is another option. Playing a separate motion while keeping the movement state is covered in Animation Montage Basics.

Try other update methods once you are comfortable

The Event Graph here retrieves the values it needs when animation updates. Once characters multiply and the cost concerns you, using Property Access and Blueprint Thread Safe Update Animation is worth considering. Start with a layout where you can see which character each value comes from, and firm up your understanding first.

There is also Motion Matching, which searches a large library for motion that fits the situation. Even when you move on to the Game Animation Sample article, the idea from here — that the movement state and the displayed pose are separate — is the foundation.

Summary

A State Machine looks at conditions and picks a state such as grounded or airborne. A Blend Space builds the mix that fits a value within that state. With the Blend Space inside Grounded as we did here, you do not need to keep adding states just for walk and run.

Feed Speed and bIsInAir from the Event Graph, and carry the pose to the final output in the Anim Graph. Once that flow works, change the speed cap or jump in place and confirm which value is changing which part of the look.

Further Reading

Unreal Engine Notes in this section98