Skip to content

fix: eliminate figure sway and foot skating; realistic grounded mechanics - #25

Merged
a-baran-orhan merged 2 commits into
mainfrom
feat/humanized-hero-and-readme-gifs
Jul 9, 2026
Merged

fix: eliminate figure sway and foot skating; realistic grounded mechanics#25
a-baran-orhan merged 2 commits into
mainfrom
feat/humanized-hero-and-readme-gifs

Conversation

@a-baran-orhan

Copy link
Copy Markdown
Member

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. applyGroundLock now 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:

  • A squat now sits the hips back over planted feet (real mechanics) instead of sliding the feet forward.
  • Swing legs stay free: only feet near the floor anchor, so curls/marches are unaffected.
  • Symmetric spreads (jumping jacks) don't fight: only the average delta is corrected.
  • Travel and yaw choreography compose: anchors move with the phase's root offset and rotate with its yaw.
  • The headless eval probe mirrors the identical anchor pipeline, staying viewer-faithful.

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

  • 361/361 eval checks across 73 movements — including walk-cycle travel and quarter-turn yaw, the compositions most at risk from horizontal planting
  • 188/188 unit tests, clean typechecks (render, eval, playground)
  • Visual: squat top vs bottom shows pixel-identical foot placement with the pelvis traveling down/back
  • Visual: single-leg hamstring curl (planted leg steady, swing foot free), walk-and-turn (travel + about-face preserved)
  • Reviewer pass over remaining library presets

🤖 Generated with Claude Code

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).
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
posecode Ready Ready Preview, Comment Jul 8, 2026 10:26pm

@a-baran-orhan
a-baran-orhan merged commit 63d9a2a into main Jul 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant