On flat ground nobody sees the problem. The moment there is a slope or a step, the feet sink or hover, and the illusion collapses. Two Unreal nodes fix it, provided you prepare them properly.
| Node | Its job |
|---|---|
| Foot Placement | Decides where the foot lands, based on the terrain. |
| Leg IK | Bends the legs so the rest of the body follows that position. |
They are called in that order, in the AnimGraph, just before the Output Pose. The Animation Warping plugin has to be enabled first.
Creating the IK foot bones
These nodes require IK foot bones: bones sitting at the feet, which do not drive the animation but act as a marker for where the foot should be. Recent Unreal characters already have them. If not, they take three clicks to create in the skeleton.
- 1In the skeleton, right-click root ▸ Add Virtual Bones, and select root. Name it ik_foot_root: it then sits at the same position as the root.
- 2Right-click ik_foot_root ▸ Add Virtual Bones, and pick the left foot (foot_l).
- 3Right-click ik_foot_root again, and pick the right foot (foot_r).
The virtual bones you get sit exactly on top of foot_l and foot_r. That is intended: they are a position reference, not a control.
The setup
In the Foot Placement node, point at the IK Foot Root you created, then at the Pelvis — the bone immediately after the root. Then add one Leg Definition per leg:
- FK Foot — the animation’s foot bone.
- IK Foot — the virtual bone created in the previous step.
- Ball Bone — the toe bone, usually right after the foot.
Once both legs are filled in, right-click Leg Definitions to copy, then right-click and paste into the Leg IK node. Both nodes expect the same description: no need to type it twice.
At this point the character keeps his feet on the ground, including on a slope where each foot settles at its own height.
The jump, and why the legs go haywire
Try a jump: the legs do whatever they like. That is logical — Foot Placement is desperately trying to put the feet on the ground, including where there is none beneath them. So it has to be switchable.
- 1Set the node’s alpha to Manual so you can drive its activation.
- 2In Leg IK, fill in Disable Leg Curve Name — leg_disable, for instance — identically on both legs.
- 3In every airborne animation, add a curve with that name (Add Curve ▸ Create Curve).
- 4Place a key at 0 seconds with a value of 1: at 0 Foot Placement is active, at 1 it is disabled.
That curve is then copied into every jump animation — take-off, apex, fall. Not into the landing: by the time it plays, the character has found the ground again and Foot Placement is useful once more.
Quick turns cause the same trouble on some animations. If you have implemented one, add the same curve to it.
The result
Feet that hug the terrain, slopes included, and no more mid-air glitches. Two nodes, three virtual bones and one curve — for a detail everybody notices when it is missing, and nobody sees when it is there.