BoneAttachment3D trailing behind, why?

Godot Version

Godot v4.4.1.stable - Windows 11 (build 22631) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3090 (NVIDIA; 32.0.15.6603) - 11th Gen Intel(R) Core™ i9-11900K @ 3.50GHz (16 threads)

Question

Why are my hurtboxes trailing behind? You can see in the attached screenshot that the hurtboxes (green ShapeCast nodes attached to the Skeleton3D with BoneAttachment3D nodes) are in the pose from the previous frame. This is really bad. How can I fix this? I recently fixed the 1 frame delay for the collisions, but I just can’t figure out how to stop this from happening.

This is a common issue with BoneAttachment3D because it updates after the Skeleton3D’s pose is calculated for the frame. As a result, attached nodes like your hurtboxes can appear one frame behind. A workaround is to manually update the hurtbox transforms in process() or physics_process() after the skeleton updates. Alternatively, you can skip BoneAttachment3D and apply the bone transforms directly to your hurtboxes for better control. This usually helps keep everything in sync within the same frame.

1 Like