An Unreal Engine Animation Modifier that bakes per-foot contact_l / contact_r curves onto your AnimSequences from foot bone height and speed thresholds. Drop-in compatible with Game Animation Sample Project (GASP), motion-matching pipelines, and any system that expects 0/1 foot-contact gates for foot-lock IK, stride warping, or pose-search features.
Epic's GASP locomotion clips ship with contact_l and contact_r curves baked in — but the tool that generates them was never released. Epic confirmed on a livestream that the curves were authored by an internal unreleased script.
If you bring custom locomotion animations into a GASP-based project (or any motion-matching setup that consumes contact curves), you're stuck either hand-keying every clip or writing the tool yourself.
This plugin closes that gap. Drop new clips into your project, multi-select them in the Content Browser, right-click → Apply, and every clip gets GASP-shaped contact curves.
- Copy the entire
FootContactCurvesfolder into your project'sPlugins/directory so you end up with:YourProject/Plugins/FootContactCurves/FootContactCurves.uplugin - Right-click your
.uproject→ Generate Visual Studio project files. - Build your editor target (in Visual Studio, or via your usual UBT command).
- Open the project. The plugin auto-enables.
No engine source modifications. No extra plugin dependencies. Editor-only — nothing ships in your packaged builds.
- In the Content Browser, multi-select the AnimSequences you want to bake.
- Right-click → Animation Asset Actions → Apply Animation Modifier.
- Pick Foot Contact Curves.
- Adjust settings if you need to (defaults work for the UE5 mannequin), click Apply.
Open any of the baked sequences and check the Curves panel — contact_l and contact_r will be there.
| Property | Default | Notes |
|---|---|---|
| Bake Left Foot | true |
Skip the left foot when off. |
| Foot Bone Name L | foot_l |
Change for non-mannequin rigs (e.g. LeftFoot, Bip01_L_Foot). |
| Curve Name L | contact_l |
Standard for GASP / Motion Matching. |
| Bake Right Foot | true |
Skip the right foot when off. |
| Foot Bone Name R | foot_r |
Same notes as left. |
| Curve Name R | contact_r |
|
| Sample Rate | 30 |
Sampling FPS (range 10–240). Higher = more accurate, slower bake. |
| Ground Height Threshold | 6.0 |
Centimeters. A foot is "planted" when its height above the lowest foot Z over the clip is below this. |
| Vertical Speed Threshold | 30.0 |
cm/sec. A foot must be moving slower than this vertically to count as planted. |
| Interpolation Mode | Linear |
Linear for smooth ramps, Constant for sharp 0/1 plateaus, Cubic for eased transitions. Pick to match your downstream consumer. |
| Overwrite Existing Curves | true |
Removes the existing curve with the configured name before baking. |
Per foot, per clip:
- Pass 1 — find the ground. Sample the foot bone every frame in component (world) space; the lowest Z it ever reaches over the clip is the ground level. This handles slopes and uneven authored heights without manual tuning.
- Pass 2 — classify each frame. Mark the foot as planted (
1) when both:- foot height above ground <
GroundHeightThreshold, AND - foot vertical speed (
|ΔZ|between consecutive frames) <VerticalSpeedThreshold - Otherwise mark as in-air (
0).
- foot height above ground <
- Write the curve through
IAnimationDataController::SetCurveKeyswith the chosen interpolation mode. Transactional, so it shows up in the editor's undo stack.
Each bake logs to LogFootContactCurves (Output Log) with sample count, planted percentage, detected ground level, and the active thresholds — useful for tuning.
If the baked curve doesn't look right, check the Output Log for the bake stats and try:
| Symptom | Likely cause | Fix |
|---|---|---|
| Curve is flat 0 (nothing registers as planted) | GroundHeightThreshold too low, or wrong foot bone name |
Bump threshold to 8–10 cm; verify bone name |
| Curve is flat 1 (everything is "planted") | Threshold too high, or VerticalSpeedThreshold too lenient |
Lower GroundHeightThreshold to 4–5 cm; tighten speed |
| Curve flickers between 0 and 1 mid-step | Sampling aliasing on subtle motion noise | Raise Sample Rate to 60; widen thresholds slightly |
| Curve plateaus too soft / too sharp | Interpolation mode mismatch | Switch between Linear / Constant / Cubic |
Modifiers are reversible. With the AnimSequence open, find the Animation Modifiers panel in the asset Details; press Revert on the Foot Contact Curves entry to delete the curves it added. Or just re-apply with Overwrite Existing Curves = true to overwrite.
- Tested on Unreal Engine 5.7. Should work on 5.4+ (relies on
UAnimationModifier,IAnimationDataController, andUAnimPoseExtensions, all stable since 5.2). - Requires only the engine modules
AnimationModifiersandAnimationBlueprintLibrary— both ship with the editor. - Plugin module is
Type: Editor, so it never compiles into shipping/cooked builds. Zero runtime cost.
Released under the MIT License. Copyright (c) 2026 Shane Beal.
