Skip to content

fix: run reach-IK before the floor safety clamp (levitating cobra) - #27

Merged
a-baran-orhan merged 1 commit into
mainfrom
fix/reach-before-floor-clamp
Jul 10, 2026
Merged

fix: run reach-IK before the floor safety clamp (levitating cobra)#27
a-baran-orhan merged 1 commit into
mainfrom
fix/reach-before-floor-clamp

Conversation

@a-baran-orhan

Copy link
Copy Markdown
Member

Description

From a prone base, an authored reaching pose — cobra's shoulders: flex 50 + reach: hands floor — swings the arms through the floor via FK. The viewer frame loop applied its floor safety clamp before reach-IK, so the clamp resolved the penetration the only way it can: by hoisting the entire rigid body upward until the hands cleared the floor. The pelvis and legs levitated in mid-air, making cobra (and any prone/seated movement that reaches for the floor) physically impossible-looking.

Two changes in packages/posecode-render/src/index.ts:

  • Reach-IK now runs after ground-lock/pins but before the floor clamp. Reaching limbs bend down to meet the floor first, so the clamp becomes a no-op for legitimately grounded poses instead of lifting the whole body over a penetrating limb.
  • The floor reach target is mesh-aware. It now rests the visible palm on the floor rather than driving the wrist bone to y=0; the hand mesh extends below the bone, and the old target left the mesh sunk, forcing a residual whole-body lift from the clamp.

Verified in the playground: cobra now keeps pelvis/legs planted while the chest lifts; mountain climber (hands+feet ground-lock) and superman (prone, clamp-only path) are unchanged.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Movement/Preset addition (adding a new .posecode script and registering it)
  • Documentation update

Checklist

  • My code follows the code style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new TypeScript/compiler warnings or errors:
    • Running npm run typecheck passes successfully
    • Running npm run build compiles without errors
  • I have run the unit test suite (npm test) and all tests pass (194/194)
  • If applicable, I have run the fidelity evals (npm run eval) and all checks pass (361/361, 73 movements, 0 clamp warnings)
  • If I added a new movement, I ran node scripts/generate-content-pages.mjs to regenerate the static pages (N/A)

…d to the floor

From a prone base, an authored reach pose (cobra: shoulders flex 50 +
reach: hands floor) swung the arms through the floor via FK. The frame
loop's floor safety clamp ran before reach-IK, so it resolved the
penetration by lifting the entire rigid body until the hands cleared
the floor - legs and pelvis levitating in mid-air.

- Apply reaches after ground-lock/pins but before the clamp, so the
  arms solve down to the floor and the clamp becomes a no-op for
  grounded poses.
- Make the 'floor' reach target mesh-aware: rest the visible palm on
  the floor instead of driving the wrist bone to y=0, removing the
  residual body lift from the bone-vs-mesh gap.
@vercel

vercel Bot commented Jul 10, 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 10, 2026 6:06pm

@a-baran-orhan
a-baran-orhan merged commit 05e815b into main Jul 10, 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