Background
Background

Dynamic Mantling using Motion Warping

I use Motion Warping to adapt low and high mantle animations to different ledge heights. Low uses a standing mantle and High uses the start of a climb. The ledge grab guides the animation, while the character's collision capsule gets its own landing and support checks.

Normal and Debug draw show separate runs at normal simulation speed with the same camera, default lighting Blueprint and saved movement and animation settings. Heights measure obstacle tops above the approach floor.

Low mantle

80 cm

Normal

Normal view shows a Low mantle onto an 80 cm obstacle.

Debug draw

The 80 cm Low mantle with the live capsule, magenta grab target and four cyan support rays.

120 cm

Normal

Normal view shows a Low mantle onto a 120 cm obstacle.

Debug draw

The 120 cm Low mantle with the live capsule, magenta grab target and four cyan support rays.

160 cm

Normal

Normal view shows a Low mantle onto a 160 cm obstacle.

Debug draw

The 160 cm Low mantle with the live capsule, magenta grab target and four cyan support rays.

High mantle

235 cm

Normal

Normal view shows a High mantle onto a 235 cm obstacle.

Debug draw

The 235 cm High mantle with the live capsule, magenta grab target and four cyan support rays.

260 cm

Normal

Normal view shows a High mantle onto a 260 cm obstacle.

Debug draw

The 260 cm High mantle with the live capsule, magenta grab target and four cyan support rays.

285 cm

Normal

Normal view shows a High mantle onto a 285 cm obstacle.

Debug draw

The 285 cm High mantle with the live capsule, magenta grab target and four cyan support rays.

In Debug draw, four thin cyan rays show the outer support samples. You can also see the live collision capsule and the magenta grab target.

Check the ledge and landing

Collision traces find a suitable wall and sample the top around a proposed landing. The higher route also checks the ledge across the animation's grab span. The animation choice depends on how far the capsule needs to rise to reach the landing.

The capsule needs support at the destination and clearance over the obstacle. Lift, crossing and landing checks describe a clearance envelope, separate from the animation's exact trajectory.

Detection gates, contact span and capsule support

The custom MoverExtended grounded-mantle probe requires a static wall that blocks the capsule and is not tagged NoClimb. The route must then pass support and clearance checks.

Grounded mantle schematic. Wall rays find a face, five top samples check support, and a dashed capsule sweep connects the approach to a separate landing beside the grab edge.
This three-panel schematic shows wall discovery, five top samples around the proposed landing, then capsule sweep clearance for grounded mantles.

Five downward samples, at the centre and four surrounding positions, must find compatible top surfaces on the same obstacle. The fitted plane must be walkable, with dot(normal, up) >= 0.71, sample heights within 2 cm and normal agreement of at least 0.99. These samples do not establish continuous support between the tested points.

The probe first tries the input direction. A higher landing, or a failed route with valid wall evidence, triggers a wall-facing re-probe. That route must qualify for mid/high mantle and pass the authored 28 cm half-width grab-span checks. A failed oblique approach cannot become a low mantle through this fallback.

For an upright capsule of radius r, fitted unit top normal N and unit up vector U, the extra lift above the plane height at the capsule axis is calculated as follows.

slopeLift = r * (1 / dot(N, U) - 1)

A separate allowance clears a lip higher than the landing surface. Real capsule-contact and floor checks validate the destination. Waypoint overlaps and full-capsule sweeps validate the clearance envelope.

The fallback can use a smaller support area when samples miss. Conflicting hits or a blocked path still reject the route.

Turn contact into movement

Root motion supplies the animation's raw local movement over each simulation interval. Motion Warping adjusts it during configured windows using the animation root's relationship to the ledge marker.

Mover converts the warped motion into world space and processes movement proposals. The movement mode receives the final desired movement after mixing. Applied movement is the capsule's actual displacement after movement and collision handling.

Saved low/high animations, extraction and warp targets

The saved low and high animation montages in Unreal Engine 5.8.3 use Epic's stock URootMotionModifier_SkewWarp. Both use the Bone warp-point provider with attach, targeting FrontLedge, with XYZ translation and SLERP rotation enabled. No custom missing-marker fallback is assigned to either montage.

Low uses the complete 2 s standing-mantle sequence. Its saved windows are approximately 0.140674–0.364971 s and 0.364973–0.699242 s.

High uses the first 2.75 s of a 3.333333 s relaxed climb-start sequence. Its saved windows are approximately 0.000100–0.645919 s and 0.646261–0.958932 s.

These are saved montage timings. The run logs identify the mantle band, and the source shows which animation each band selects.

UPlayMoverMontageCallbackProxy separates visual playback from movement extraction through FLayeredMove_AnimRootMotion. In the source's standalone path, extraction follows simulation time.

dt = StepMs / 1000
effectiveRate = PlayRate * Montage.RateScale
t0 = StartingMontagePosition
   + ((BaseSimTimeMs - StartSimTimeMs) / 1000) * effectiveRate
t1 = t0 + dt * effectiveRate

UMotionWarpingUtilities::ExtractRootMotionFromAnimation returns the raw local change in root transform over that interval.

The bone provider accounts for the animation root's offset from attach at the window end, including any enabled mesh-scale adjustment.

EffectiveRootTarget = CachedRootRelativeToWarpPoint * PublishedTarget

This uses Unreal transform composition. For remaining root displacement R and target displacement T, expressed in a basis aligned with the remaining root motion, Skew Warp's normal translation branch uses the following scale.

forwardScale = dot(T, normalize(R)) / length(R)

Within the warp window, it applies forward scaling and yaw/pitch shears to the interval translation, preserving any unwarped post-window remainder. Rotation and degenerate translation are handled separately.

I enable traversal root motion during player initialization, after applying the profile. The saved movement mode template starts with use_root_motion=false.

Motion Warping configuration

I use two Skew Warp windows in each mantle montage to adjust root motion at two stages of the climb. A single window did not consistently keep the whole mantle smooth on awkward approaches or uneven terrain.

Low

Low mantle montage with two Motion Warping windows on the timeline and the second selected.
The second window uses the attach bone and the FrontLedge target.

Mid

Mid climb-start montage with the first of two Motion Warping windows selected and its Skew Warp details open.
The first window targets FrontLedge with a warp rotation time multiplier of 0.8.

High

High climb-start montage with two Motion Warping windows on the timeline and the first selected.
The first window begins with the montage, followed by a shorter second window.

Check the capsule and the pose

Each grounded mantle temporarily ignores only the accepted obstacle component during each swept move. Collision is restored immediately afterwards, before the final overlap and floor checks. Other geometry can obstruct the move and cause sliding. A clear endpoint with walkable support permits a return to walking, while an unsupported completion can enter falling.

Low and High keep their authored poses. The capsule checks cover clearance and landing support. Hand and foot placement depends on the pose.

Desired displacement, collision and completion

Low and high use different animations within the same grounded mantle movement mode and share its movement policy.

World conversion uses the simulation actor transform and the full mesh-to-actor transform, including root rotation. The root-motion layer proposes velocity from world root translation divided by the simulation step duration. After mixing and callbacks, the movement mode consumes the final incoming proposal.

desiredDisplacement = Params.ProposedMove.LinearVelocity * dt

Here dt is the substep duration in seconds. This desired displacement is separate from both the warped local extraction and the capsule's applied displacement.

The grounded route uses UMovementUtils::TrySafeMoveAndSlideUpdatedComponent. Other geometry can cause impact handling, sliding or penetration correction.

Completion checks run when extraction reaches the montage source end. With obstacle collision restored, overlap and floor-support checks determine the handoff. Walking requires a clear endpoint on static, walkable support within the implemented 5 cm floor-distance limit.

The capsule's actual start/end transforms establish applied displacement. FMovementRecord distinguishes movement relevant to velocity from other displacement, so velocity multiplied by time need not include every correction.

Testing and validation

I used the Movement Test Ground runner to replay the same movement and mantle inputs at each height, with the simulation fixed at 60 Hz. The runner logged mode changes, floor support and course goals in JSON. The Normal and Debug event sequences matched at each height.

I tested Low at 80, 120 and 160 cm and High at 235, 260 and 285 cm. All 12 runs picked the expected mantle and returned to walking with floor support. The Low runs finished the course. The High runs timed out at a later travel target.

Move over the bright dot and follow the line. P pauses. Escape closes the game.

Sigil Trace

Move over the sigil before time runs out.

Score0000
Spells00
Best on this browser0000
I · KINDLE SPELL 01
START

Trace the Sigil with your mouse

Start at the glowing dot and follow the line. No click needed.

or press Enter
Move your mouse onto the bright dot. No click needed.