Hello Blender Community,
I am fairly new to Blender. I created a character, rigged him and gave him run/idle animation. I made a sword and I want to connect the sword to his hand so when he runs, he runs with it. I have tried parenting and joining but the sword is still seperate.
Thank you in advance.
A common method of doing this is to put a special bone in the hand used just for attachments. Then link your sword, or whatever object is being carried, to that bone. The link can be a Parent/Bone relationship, a Child Of constraint, a Copy Location constraint, Copy Transforms, etc., depending on the type of object and how it should move with the hand. Parenting is the most limiting choice as it cannot be animated. Constraints are more often used because their influence can be animated, and they have other options that are useful when setting up the constraint.
The paint bucket in my showreel was constrained in this manner so the character could fling it away. It also allowed me to animate the swinging of the bucket as she moves about the area.
I am making this for a game in Unity. Would it still be a good idea to use child of constraint? I want him to be able to sheath/unsheath, attack, that would all be possible, correct?
Designing for a game environment is very different. The special bone is still a very common method, but scripting in Unity will likely be required to make the sword act properly. AFAIK Blender’s constraints don’t transfer, just bone data used to move the mesh, Experimentation is in order, and you should contact Unity user groups for tips in the implementation.
Get your sword in the hand the way you want it and parent the sword to any finger bone. First go into pose mode with your armature.
select your sword in object mode, then select the bone that you want to parent the sword to then cntrl+P
BlenderBoy55: Apart from the necessity of having this all work in the Unity environment, parenting to a finger bone is a poor choice because it means the sword moves whenever the finger moves, and that may not always be desirable. Say there’s a dramatic sequence where the swordsperson flexes his/her fingers about the hilt in preparation for a fight, while the thumb holds the sword in place. If parented to a finger bone, the sword will move out of place when that finger is flexed. Much better to use a special bone, often placed in the inner palm area, so all the other bones can be animated independent of the sword’s parenting.
And if the character ever has to release the sword, as in sheathing it (mentioned above), or throwing it, or dropping it, parenting would present undue difficulties that a constraint would not have.
Thanks for your input! I’m new to this to and currently i had my sword parented to the palm bone. i guess thats ok as long is not a finger i guess?
Yeah, a palm bone can work if it isn’t affected by other animation controls. In my rigs, there’s a control for “closing” or “opening” the hand in a certain way by moving the palm bones, which would move any attached item, so I have to avoid that. An independent attachment bone resolves all these issues, but it is very similar to a palm bone in other respects.
In a game environment an attachment bone is useful because you can script for it without affecting any other aspects of the animation, or having the animation affect the attachment functions.