MOTION WARPING / THRUST · UNREAL ENGINE 5.8

Five stabs
and one target anywhere.

ENGINEUnreal Engine 5.8
BUILT WITHBlend Space · Control Rig · C++ · Anim Modifiers
FOCUSMotion warping · Editor tooling
SOURCEGitHub ↗
THE FULL THRUST, AIMED AT THE TARGET
// 01 · how it fits together

Five stabs go in, one stab comes out.

01Anim ModifiersBake the hand path and the foot curves
→
02Thrust Data TableTurns those paths into blend coordinates
→
03Blend SpaceMixes the five stabs toward the target
→
04Control Rig: handAims the blade socket at the target
→
05Control Rig: feetKeeps planted feet planted

The first two steps happen in the editor, once per clip. By the time the game runs, the hard geometry is already baked into the animations and the table.

The blend space does the big move: it gets the whole body stabbing in roughly the right direction, with real animation doing the work instead of a stretched-out arm. Then the two Control Rig passes clean up what a blend can never get exactly right.

// 02 · five thrusts, one target

Teaching a blend space where a stab goes.

There are five thrusts: up left, up right, middle, low left and low right. A blend space wants a coordinate for each one, and typing "this one is, like, kind of up-left" by hand is just guessing with extra steps.

So an animation modifier walks the hand bone through each clip. It takes the summit, the point of the path farthest from where it started, and fits a least-squares line through every sample of the path, pointing toward the summit. One clip, one thrust line.

MATHS

Where all the stabs meet

Five lines in 3D never cross perfectly, so I look for the point with the smallest total squared distance to all of them. It comes out as a small 3×3 system, and that point is where the stabs converge.

MATHS

A coordinate from a cross product

For each clip, I cross the direction from the average position to the convergence point with the direction from that clip to the convergence point. The Z and X of the result become its spot in the blend space.

TOOL

A table that keeps itself up to date

A custom Thrust Data Table asset, right in the Content Browser. Add a row or change a clip and every coordinate is recomputed on its own, so nobody has to remember to.

DEBUG LINES: THE FIVE THRUSTS AND THE TARGET
// 03 · aim bone socket

The bone may rotate. The socket may not.

A blend gets close, never exact. The blade hangs off a socket on the right hand, and that socket has its own position and rotation offset. I need the socket's X axis to go straight through the target, but the only thing allowed to move is the hand bone.

Pointing the bone at the target doesn't cut it: the offset carries the blade right past. So I wrote a custom C++ Control Rig node, Aim Bone Socket, that rotates the bone so the socket ends up aimed.

MATHS

Find the right point on the blade

It solves for the point on the socket's axis that sits exactly as far from the bone as the target does (the larger root of a quadratic), then applies the shortest rotation from that point to the target. The twist stays untouched.

SAFETY

It knows when it can't

If the target is closer to the bone than the blade's axis ever gets, there's no answer, and the node says so with a bReachable flag instead of making one up. There's also a weight, blended with a slerp.

TESTED

0.0000024°

I checked the maths on its own against 5,000 random bones, sockets and targets. That's the worst miss. I'll take it.

// 04 · foot lock

Lunging is easier when your feet stay put.

Blend five thrusts together and you also blend five sets of feet. Each clip plants them in a slightly different spot, so the mix slides around like the floor got waxed.

So another animation modifier looks at the heel and the toe of each foot, frame by frame, and measures how fast they move in world space, root motion included. Slow enough means planted, fast enough means free, with a smooth ramp in between and some smoothing to kill the noise. That gets baked into each clip as a curve.

At runtime the Control Rig reads those curves: they say whether a foot is allowed to move and how fast, and a TwoBoneIK keeps it where it should be.

FOOT LOCK OFF VS. ON