Quick answer: Godot BoneAttachment3D attaching a sword to a hand bone but in the wrong position? The attachment uses the bone’s rest pose; set a local transform on the attachment for offset.
A weapon attached to a hand bone floats 30cm above the hand — the rest pose has the hand in T-pose, not the grip orientation.
Bone Attachment Math
BoneAttachment3D’s transform is the bone’s world transform * its own local transform. Setting position (0,0,0) places the attachment at the bone’s rest origin.
Local Offset
attachment.position = Vector3(0.05, 0.02, 0.0)
attachment.rotation = Vector3(0, deg_to_rad(90), 0)Tune the local transform until the sword sits naturally in the hand.
Override Pose Mode
Set override_pose on the attachment to drive the bone’s pose at runtime (e.g. IK targets). Different use case than rigid attachment.
Animation Bake Differences
Different DCC export tools produce slightly different rest poses. Tune offset per asset pipeline; don’t expect universal numbers.
Verifying
Weapon sits cleanly in the hand across animations. Drawing, swinging, and idle all look correct.
“BoneAttachment uses rest pose. Tune local transform for in-hand offset.”
Save the attachment offset as a sub-resource on the weapon — per-weapon offsets stay with the weapon, not with the character.