Four separate third-person defects, one shared root: the arms were posed at
art-directed ANGLES that merely approximated the gun, and a stuck one-shot
flag kept handing them back to the animation clip.
- The rifle hold was silently DEAD after the first reload or throw. The gate
trusted AnimationNodeOneShot's `active` parameter, which never clears, so
clip_owns_arms stayed true forever and the clip drove the arms while the
gun hung off the hand. `_upper_lock` (a timer we own) is now the
authority, and the one-shot is explicitly faded out when it expires.
This alone is why the gun was never held correctly.
- Arms are now solved with real two-bone IK (`_ik_arm`) onto points derived
from the WEAPON: the stock is anchored in the shoulder pocket, the grip
and foregrip fall out along the barrel, and the support hand is placed on
the actual handguard (sliding inboard if the model is too long to reach).
Verified numerically: the hand lands within 2mm of its target.
- `_measure_weapon` measures the model's AABB along its barrel and re-seats
it so the hand sits at a realistic pistol-grip point. Weapon models put
their origin anywhere — the M4's was 10cm from the muzzle end, so parking
its stock in the shoulder drove the hand INTO the shoulder and folded the
arm up behind the head.
- Recoil now shows for the OWNER in third person: server_play_fire_effects
only ever fired for remote shooters, so the local player saw nothing. The
ammo counter dropping now kicks the model. The kick rides in the gun's aim
direction so the IK carries BOTH hands up with it, instead of rotating the
arms and shoving the support hand off the gun.
- Reload no longer flips the gun. The library's pistol-reload rotates the
wrist the gun is parented to, which turned the rifle upside-down (mag to
the sky) while the hand reached down for it. The hold now keeps the right
arm through a reload and the support hand does the magazine work at the
real mag well, under the receiver.
anim_capture gains recoil shots and lets ADS settle before framing;
debug/dump_bones.gd prints a skin's bone hierarchy.
Co-Authored-By: Claude Opus 4.8 <[email protected]>