How connect CharacterBody3d to recognize which bone was hit

Godot Version

godot 4.4.1

Question

Hi!
I have model from mixamo with animmation, bones have collisionshapes attached to them in a wa I could manipulate them and now I have pretty fine hitboxes that follows movement.
However I don’t know how to properly add hit detection since characteerbody3d will detect only collisionshapes right under it, not nested below inside skeleton.

How it’s done properly?
cause I don’t want to copy those hit boxes, I think I don’t want to make them follow movement of bones in code. Or is it how it’s done?

Put an Area3D under each PhysicalBone3D, then move the CollisionShape3Ds under that. Make sure the collision layers of the Area3Ds are correct so that a weapon can hit them. Alternately if the weapon uses a layer and not a mask, make sure the Area3D collision masks match the weapon. Then just connect the signal up for each Area3D and run whatever code you want for each part.

ok thank! seems pretty clean solution :slight_smile:

1 Like