A character running perfectly upright, whatever happens, gives the prototype away instantly. Lean — the sideways tilt through turns — and slope — the pitch on inclines — are built in a single pass, and graft onto any existing locomotion.
Creating the additive poses
An additive pose is a static pose that layers on top of existing animations. Making one is simpler than it sounds.
- 1Open any animation of the character and do Create Asset ▸ Create Animation ▸ Reference Pose.
- 2Name it with, say, a pose_ref suffix: that is the neutral pose.
- 3Duplicate it four times: Lean L, Lean R, Slope Up, Slope Down.
- 4In each one, open the Skeleton Tree, select the bone to change, rotate it with the rotation tool, then set a key.
| Pose | Bone | Orientation |
|---|---|---|
| Lean L | spine_01 | Leaning to the left |
| Lean R | spine_01 | Leaning to the right |
| Slope Up | pelvis | Body pitched back |
| Slope Down | pelvis | Body pitched forward |
The slope poses are made on the pelvis, not the spine: the feet then stay parallel to the ground, which keeps them from sinking into the slope on the way up.
Last step, essential and easy to forget: open each pose, Additive Settings section, and set Additive Anim Type to Local Space. Without it, they will override the animation instead of adding to it.
The Blend Space
Right-click ▸ Animation ▸ Blend Space, on the character’s skeleton. Two axes are enough to blend the four poses.
| Axis | Range | Smoothing |
|---|---|---|
| Horizontal — lean | -45 to 45 | Linear, 0.4 |
| Vertical — slope | -20 to 20 | Spring Damper, 0.2 |
- 1Tick Snap to Grid on both axes.
- 2Place Lean L on the left, Lean R on the right, Slope Up at the top, Slope Down at the bottom.
- 3Add the neutral pose in the centre.
Hold Ctrl and move the mouse around the Blend Space window: the poses blend live. It is the best way to check the ranges before writing a single line of code.
Wiring it all into the AnimGraph
- 1In the Cycle state, add an Apply Additive node.
- 2Base takes the run animation; Additive takes the Blend Space.
- 3Wire Apply Additive into the Output Pose.
- 4Right-click the Blend Space inputs ▸ Promote to Variable, to create the Lean and Slope variables.
- 5Copy the whole thing into the Start state, so the tilt works on the run start too.
Feeding the lean
In the Event Graph, the Calculate Direction node does all the work: it takes the character’s velocity and its rotation, and returns the angle between them. Wire its output into Set Lean.
Compile and test: the character leans left when it turns left, right when it turns right.
Feeding the slope — and the function that is missing
For the slope, Unreal provides Get Slope Degree Angles. It needs the character’s right vector and up vector — easy enough — and the ground normal, which nothing provides. So it has to be written, and that happens in the character Blueprint.
- 1Create a Get Floor Normal function in BP_MyCharacter.
- 2Inside it, place a Line Trace by Channel.
- 3Start: Get Actor Location. End: the same position minus 15000 on the Z axis.
- 4On the Out Hit, add a Break Hit Result and take Impact Normal.
- 5Add a vector output to the function and wire Impact Normal into it — after a Branch checking the trace actually hit something.
- 6Set the function to pure: it can then be called without an execution wire.
A line trace is not thread safe. If you later take the Animation Blueprint Thread Safe, this logic will have to live entirely on the character side, with the Slope variable carried by it.
Back in the Animation Blueprint, call Get Floor Normal from the character reference, wire it into Get Slope Degree Angles, and feed Set Slope with the Pitch Degree Angle output.
Turning around on a slope
One last case breaks the illusion: turning around mid-climb. The Turn state has no additive pose, so the character straightens up in the middle of the slope.
- 1Copy the Apply Additive and its Blend Space into the Turn state.
- 2Wire the quick-turn animation into Base.
- 3Disconnect the Lean input.
The character stays oriented to the ground through its pivot, without leaning sideways — which would ruin the quick-turn animation. Two minutes of work for a flaw nobody could name, but everybody would see.