fix: eliminate figure sway and foot skating; realistic grounded mechanics - #25
Merged
Merged
Conversation
Breathing via chest/spine bone rotations ran before ground-lock and pin solving, which translated the whole figure every frame to re-plant the displaced hands/feet: every movement visibly swayed and the head bobbed in poses that should hold it still (e.g. a squat). Breathe by swelling the named ribcage mesh (~5% front-to-back) instead. A mesh scale cannot touch any joint, so authored movements render exactly as the timeline solves them. Blinking is unchanged (already mesh-only). Verified: 361/361 eval checks across 73 movements, and a paused squat now holds its pose pixel-steady across breath phases.
Feet-only ground-lock corrected only the root's Y, so FK leg motion (hip/knee flexion) slid the feet across the floor while the pelvis stayed put: squats, hinges, and calf raises all skated, the opposite of real mechanics where planted feet stay fixed and the pelvis travels. applyGroundLock now accepts per-frame anchors (the captured base-pose effector positions carried along by the phase's yaw/travel) and translates the root in X/Z so grounded feet return to them. Only feet near the floor anchor, so a swing leg in a curl or march stays free, and only the average delta is corrected so symmetric spreads (jumping jacks) don't fight the lock. The eval probe mirrors the same anchors, keeping the harness viewer-faithful. Also disable the playground's idle camera auto-rotate: a permanently orbiting scene reads as the figure swaying and makes movements hard to judge. The landing-page hero keeps its showcase orbit. Verified: 361/361 eval checks across 73 movements (incl. walk-cycle travel and quarter-turn yaw), 188/188 unit tests, and visual checks of squat (hips sit back over planted feet), single-leg hamstring curl (swing foot free), and walk-and-turn (travel preserved).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the two realism regressions reported after the humanized-figure update: figures swaying in every movement, and movements not looking life-like.
1. Breathing no longer moves the skeleton (the sway)
The merged humanized-figure PR shipped breathing as small chest/spine bone rotations applied before ground-lock/pin solving; the solvers then translated the whole figure every frame to re-plant the displaced hands/feet, so every movement visibly swayed and the head bobbed. (The mesh-only fix existed on the old PR branch but landed after the merge.) Cherry-picked here: breathing now swells the named ribcage mesh (~5% front-to-back), which physically cannot touch a joint.
2. Grounded feet are now planted horizontally (the realism)
Feet-only ground-lock corrected only the root's Y, so hip/knee FK slid the feet across the floor while the pelvis stayed put — squats, hinges, and calf raises all skated.
applyGroundLocknow accepts per-frame anchors (captured base-pose effector positions, carried along by the phase's yaw/travel) and translates the root in X/Z so grounded feet return to them. Consequences:3. Playground camera no longer orbits constantly
The idle auto-rotate made the whole scene perpetually rotate, reading as figure sway and making movements hard to judge. Disabled in the playground; the landing-page hero keeps its showcase orbit.
Test plan
🤖 Generated with Claude Code