My character has a sword that they can sheathe and move around with the sword in its' scabbard, or they can unsheathe the sword and hold it in their hand, using it to attack. How would you set up this in Godot? I've thought of several options, but I don't know if I'm trying to reinvent the wheel and there's an easier way to do it:
- Using BoneAttachment3D nodes: The sword would use a BoneAttachment3D that would switch the target bone between the hand bone and the scabbard bone when sheathing/unsheathing.
- Using different models and hiding the sword: The sword uses a BoneAttachment3D node to always remain in the hand of the character. The scabbard has a child mesh that is just the handle of the sword sticking out of the scabbard itself. When the sword is sheathed, the sword mesh becomes invisible and the handle mesh is made visible. When the sword is unsheathed it's made visible again and the handle mesh in the scabbard is hidden.
The sheathing and unsheathing animations are very quick, with the character twisting and crouching when sheathing, or turning and extending into a wide slash when unsheathing, so I will probably be able to get away with the animation not placing the sword right in the exact position inside the sheathe before making the switch in either method.
Which method works better in your experience? Is there another different (and better) way to do this?