Stop outgoing animations during blend to prevent jitter#599
Stop outgoing animations during blend to prevent jitter#599tracygardner wants to merge 4 commits intomainfrom
Conversation
When switching animations at the water edge, the immediate physics capsule shape change (vertical → horizontal) was causing the trigger intersection to flip, firing rapid Enter/Exit events and creating a jitter loop. Now updateCapsuleShapeForAnimation is called in the onComplete callback of _blendAnimationGroups when a blend is active, so the physics shape only changes after the visual transition finishes. Immediate update is preserved for the no-blend path. https://claude.ai/code/session_01DyCmMzSbLw9z3hgiLNhW4w
…tes" This reverts commit 705c5ba.
…jitter With blend animations, the outgoing animation (e.g. Walk) was kept running at decreasing weight during the blend period. If that animation has position tracks on bone transform nodes (child meshes), those meshes shift slightly during the blend. Because the ActionManager uses isRecursive:true, child mesh intersection is checked against the water trigger — causing spurious Exit events mid-blend and the resulting jitter at the water edge. Fix: stop the outgoing animation immediately when starting a blend, then capture a frozen pose snapshot as the visual blend-out source. The transition looks the same (current pose → new animation) but no live animation is running during the blend, so no child mesh drift and no spurious triggers. https://claude.ai/code/session_01DyCmMzSbLw9z3hgiLNhW4w
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughAnimation blending behavior is updated in ChangesAnimation Blend-Out Source Update
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 51 minutes and 27 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@api/animate.js`:
- Around line 1488-1500: Prettier reported formatting issues in the animate.js
block around outgoingGroup/snap handling; run the code formatter (prettier
--write .) and commit the resulting changes so the snippet around
flock._createCurrentPoseGroup(mesh, scene), outgoingGroup.stop(),
snap._isSnapshot, snap.start(...), snap.setWeightForAllAnimatables(1) and
effectiveOutgoing is consistently formatted to satisfy CI. Ensure no other style
violations are left and re-run the Prettier check locally before pushing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
The water trigger box (21x21 units) extends up the depression slope, so it fires before the player visually reaches the water. The previous code immediately switched to a horizontal capsule for the Fly animation, which is designed for airborne movement and becomes unstable on slopes — causing physics jitter before the player reaches the water. Fix: when determineDesiredShapeType returns horizontal-fly, check if the mesh is currently on a surface (checkIfOnSurface ray cast). If so, keep the vertical capsule instead. For ground-based Fly use cases like swimming the vertical capsule is correct, and the horizontal capsule is still used for genuine airborne Fly. https://claude.ai/code/session_01DyCmMzSbLw9z3hgiLNhW4w
Deploying flockxr with
|
| Latest commit: |
1a7b8fd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0fbe8254.flockxr.pages.dev |
| Branch Preview URL: | https://claude-fix-water-map-jitter.flockxr.pages.dev |
Summary
This change fixes animation blending behavior by immediately stopping outgoing animations during transitions, while maintaining visual smoothness through frozen pose snapshots.
Key Changes
Implementation Details
outgoingGroup.stop()before the blend beginsflock._createCurrentPoseGroup()which captures the current pose state_isSnapshot = trueand started with full weight (1.0)https://claude.ai/code/session_01DyCmMzSbLw9z3hgiLNhW4w
Summary by CodeRabbit