Repository navigation
fix: rig bodies are top_level — moving character roots froze the rig - #96
Merged
Merged
Conversation
A character root that writes its transform every physics frame (CharacterBody3D.move_and_slide, nav-driven NPCs) re-teleported every rig body to parent_xform * local each frame, silently discarding that frame's physics integration. The rig froze solid while the character moved (no animation showing through, no visible hit reactions) and the springs pumped clamp-level velocities into the locked bodies, which released all at once when the root stopped (e.g. on death) as an explosive ragdoll. Position springs already carry the rig along with the character (their targets move with the skeleton), so parent transform inheritance was never load-bearing. top_level applies to runtime-built and baked rigs. Numbers from the FPS integration that found it (walking nav zombie, LeftUpperLeg travel over 240 physics frames): animation 10.3 rad, rendered 0.012 rad before / 9.8 rad after; death-ragdoll peak body velocity 10.1 m/s (the clamp, released) before / 3.5 m/s after. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
A character root that writes its transform every physics frame (
CharacterBody3D.move_and_slide(), nav-driven NPCs) re-teleported every rig body toparent_xform * localeach frame, silently discarding that frame's physics integration. The visible result: the rig froze solid while the character moved — no animation showing through PhysicsRigSync, no visible hit reactions — while the springs pumped clamp-level velocities into the locked bodies, which then released all at once the moment the root stopped moving (e.g. on death), as an explosive ragdoll.Fix: rig bodies are
top_level = true(world-space, immune to ancestor transform writes), for both runtime-built and RigBaker-baked rigs. Position springs already carry the rig along with the character — their targets move with the skeleton — so parent transform inheritance was never load-bearing.Measured on the FPS integration that found it (walking nav zombie, LeftUpperLeg orientation travel over 240 physics frames):
Related Issue
None — found during integration.
Type
Checklist
godot --headless --path . --script addons/gut/gut_cmdln.gd -- -gdir=res://test/ -gexit) — 143/143, including new regression testtest_rig_survives_moving_character_root(measures ~0.000 rad body travel pre-fix)animated_npc(the moving-root demo) is the in-repo case this fixes🤖 Generated with Claude Code