fix: run reach-IK before the floor safety clamp (levitating cobra) - #27
Merged
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7 tasks
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.
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:floorreach 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
.posecodescript and registering it)Checklist
npm run typecheckpasses successfullynpm run buildcompiles without errorsnpm test) and all tests pass (194/194)npm run eval) and all checks pass (361/361, 73 movements, 0 clamp warnings)node scripts/generate-content-pages.mjsto regenerate the static pages (N/A)