I have created a model, which is meant to hold a two handed weapon, but I don't know how to make both hand to move with the weapon. The weapon only follows the right hand now. I want the left hand to hold onto the weapon, while I move the right hand with the weapon in it. Back then, I saw tutorials about animating, containing the required information as a bonus, but I can't find them, so I'm asking you. If you can't understand something, please tell it to me, so maybe I could explain it better.
1 Answer
You may use some IK (invert kinematics) and some constraints to do this kind of things.
I did a very basic model to show that :
I presume you know how to parent a mesh to an armature, but if not, please leave a comment and I could complete that.
The body is parented with automatic weights.
The gun is parented too, but all the weights are given to the root bone.
The right hand has a IK constraint with a chain length set to 4 in order to end at the shoulder (the yellow line you can see in the gif above) :
The left hand is done the same but it target an empty indicated by the green arrow :
The gun now : its root bone has a constraint in order to follow a little bone of the man armature parented to its right hand. This allows the gun to follow this hand :
The empty has a constraint too which makes it follow the gun extremity, which is the bone indicated by the arrow in the 3D view below :
So, to summarize :
- The gun follows the right hand
- The empty follows the gun extremity
- The left hand follows the empty
But in some situation surely, you want to free the left hand, because the man position needs it. So simply lower the influence of the left hand constraint to allow it to come back in place. You are also free to move it independently :
-
2$\begingroup$ I'm following the steps, but I cannot set "Empty" as target on the left hand's IK. Is "Empty" an other object or is it a bone or what? Is that a big problem if I skip that part? $\endgroup$ Commented Jul 31, 2016 at 15:45
-
$\begingroup$ the empty is another object (shift+A then empty and here I have chosen a sphere shape). Empties are usefull as they are not rendered, so they can be pivot points, constraints, anything... that can be used to help articulating constraints or other (you can find it easily I guess in the blend file uploaded for the answer) $\endgroup$– lemonCommented Jul 31, 2016 at 15:48
-
$\begingroup$ And so, to be clear here "empty" does not mean "nothing" but effectively an object of type "empty" $\endgroup$– lemonCommented Jul 31, 2016 at 15:54
-
$\begingroup$ Okay, I'm stuck. The gun is following the right hand but the empty isn't following the gun externity (GripLeft), so the left hand isn't following the empty neither. I did everything step by step, only missed one part, I guess. The gun isn't parented to its armature, because I do not know how to parent it with the weights only on the root. $\endgroup$ Commented Jul 31, 2016 at 16:35
-
$\begingroup$ In some cases you may need to "update" these constraints going in pose mode. For the gun, parent it with empty groups, go to edit mode, select all vertices then in the property panel select the root bone and click assign. Concerning the empty, have you set the constraint of the fourth image after the gif above ? If I can suggest : have a look at the blend file I have shared before doing it on your model. Disable some constraints and see the result $\endgroup$– lemonCommented Jul 31, 2016 at 16:40