Foot Locking
Pin grounded feet in world space. Eliminate foot sliding for clean walk cycles, planted stances, and impactful kicks — all live in the browser.
Tier: Builder Pro Menu:
Physics → Foot Locking
The math behind Foot Locking is published in our open whitepaper: “Anti-Skating Foot-Locking Constraint for Browser Animation” — DOI 10.5281/zenodo.17849581.
What it does
When a foot touches the ground in a real movement (a step in a walk cycle, the planted foot of a punch, the standing foot in a kick), it stays anchored at that exact world-space position until it picks up. AI-generated and even manually-keyed animation often violates this — the foot slides along the floor while the animator intended for it to be planted. The motion looks "skating" or "ice walking" and immediately reads as fake.
Foot Locking is a live constraint: while enabled, it runs after the mixer every frame, detects which foot bones should be locked, and pulls them back to their anchor positions if they drifted. The result: planted feet stay planted. Walk cycles read as actual walking, not gliding.
Foot Locking running live during playback. The red disks are the detected anchor positions; the avatar moves over them while planted feet stay welded to those exact world-space points. The green pill at the top reports the overall balance state.
How detection works
The detector samples the clip in an isolated clone of the skeleton, frame by frame:
- Velocity check — for each foot bone (default targets: bones whose name contains
foot,ankle,toe, orheel), compute the per-frame XZ velocity (horizontal speed). - Threshold compare — if the velocity is below a tunable Lock Threshold, the foot is considered planted at that frame.
- Anchor capture — for the first frame in a contiguous "planted" run, capture the exact world-space XZ position. That's the anchor.
- Run aggregation — successive frames in the same planted run share the same anchor. The constraint will pull the foot back to it on each frame.
Default threshold: 0.005 units/frame. Below that = planted, above that = stepping/lifting.
Threshold is tunable via slider. Lower = stricter (only the very-still frames count as planted), higher = more permissive (more frames will be locked, may over-lock during transitions).
The footprint trail visualization
Once detection runs, the floor under the avatar populates with persistent translucent disks — one per detected anchor. Red-orange for left foot anchors, slightly lighter red for right. As the avatar walks, you watch its feet step exactly onto the disks. The disks stay anchored in world space; the avatar moves over them.
This is the classic footprint-trail visualization brought to the browser. It instantly shows whether your character's stride is reading correctly:
- Disks placed in a clean alternating L-R pattern → walk cycle is healthy.
- Disks bunched together → over-locked or stepping in place.
- Disks scattered randomly → detection didn't catch the planted frames; tune the threshold.
The live constraint
Detection is data — the constraint is what acts on that data during playback.
When Foot Locking is enabled (the toggle in the Physics menu, with a green checkmark when active):
- Every frame, the mixer runs first and computes the new bone positions per the underlying animation.
- Foot Locking runs after the mixer.
- For each detected anchor that's active at the current frame:
- If the foot bone drifted from its anchor, Foot Locking applies an offset that brings it back.
- The offset cascades up the IK chain (ankle → knee → hip), so the leg bends naturally to keep the foot planted.
The cascade math is what makes the result look real instead of "snapped." A naive constraint would teleport the foot, breaking the leg geometry. Foot Locking solves an inverse-kinematic update, so the leg adjusts smoothly.
A/B Compare — "Press & Hold for RAW"
The amber button in the Foot Locking panel is the bypass toggle.
- Press and hold: the constraint disables temporarily. The viewport shows the raw motion as the underlying animation defines it (with all the original sliding).
- Release: the constraint re-engages. Sliding snaps back into anchored.
Use it constantly while playback runs. Half-second hold tells you instantly how much the constraint is doing — and validates that the result is actually better.
Threshold tuning workflow
- Toggle Foot Locking on. The disks appear immediately on the floor.
- Watch playback with loop enabled.
- Sliding still visible? Raise the threshold (more frames get classified as planted → more locking → less slide).
- Avatar over-locked, feet "stuck" during transitions? Lower the threshold (fewer frames get locked → smoother transitions).
- Floor Y wrong? The Floor Y slider controls the height the floor sits at. If your avatar is hovering or sinking, adjust Floor Y to match the actual ground in your world coordinates. Default is
0.0. - Click
Re-detectto re-run the analysis with the new threshold and floor. - Iterate until the disks land cleanly in stride and playback shows planted feet.
The skating score
In the Foot Locking panel header, alongside the L-Locked / R-Locked counts, you see a Skating percentage:
[L Locked] [R Locked] [Skating]
12 14 18%
Skating is the inverse of Foot Locking quality — 0% means perfectly planted feet (good), 100% means wildly skating (bad). The classification tier (great / good / borderline / poor) is shown beneath the number.
The same metric drives the Foot Locking ring in Quality Score.
Edge cases
Avatars without obvious foot bones
Detection looks for bones whose name contains foot, ankle, toe, or heel. Quadrupeds, fantasy creatures, or rigs with non-standard naming may need bone names added to the detection list. Open an issue on Discord and we'll add convention rules.
Floor that isn't at Y=0
If your scene has a non-zero floor (a platform, a stage), set the Floor Y slider to the platform height. Foot Locking treats that as the contact plane.
Mid-air sequences
Frames where both feet are clearly above the floor (not in contact) bypass the constraint — Foot Locking only acts when at least one foot was detected as planted. Jumps and aerials work normally.
Very fast motion
Above the velocity threshold, feet are treated as moving even if briefly. Sprints sometimes need the threshold raised slightly to capture the brief contact at full stride.
Conflict with custom IK constraints
If you're already running a custom IK setup on the legs, Foot Locking can interfere. Disable Foot Locking before applying custom IK.
Workflow — typical session
- Import a walk cycle or locomotion clip.
- Toggle
Physics → Foot Lockingon. Disks pop onto the floor; the panel shows L/R counts and Skating %. - Play with loop. Watch the feet.
- Sliding visible? Raise threshold by 0.001-0.002, click Re-detect.
- Hold "Press & Hold for RAW" briefly. Confirm the difference is real.
- Once the disks look right and Skating % is low (<10% is great), Foot Locking stays enabled.
- Run Quality Score afterward to see the Foot Locking ring fill green.
Foot Locking remains enabled across sessions until you toggle off — you can leave it on as a default for any locomotion work.
Related
- Quality Score — Foot Locking is one of the four scored metrics
- Center of Mass — pairs with Foot Locking for full-body balance validation
- Joint Limits — the IK cascade in Foot Locking respects joint limit clamps
- Whitepaper: Anti-Skating Foot-Locking Constraint for Browser Animation (Zenodo, DOI 10.5281/zenodo.17849581)
