how best to move a rifle with soldier's hands?

Greetings,

So the subject states my general question: how best can I have a rifle move with a soldiers hands, one hand being on the ‘trigger’ grip, and the other hand forward with the ‘stabilizing’ grip?

Here’s what I’ve tried and where I’m hitting a problem:

I set the gun model to be a child of the ‘trigger’ hand bone, so that I can position the ‘trigger’ hand to point the gun. So far so good. Next I set the ‘stabilizing’ hand bone to be child of the ‘trigger’ hand. This works just fine; now I can move the ‘trigger’ hand: the gun and ‘stabilizing’ hand follow.

Then I hit a problem. When I rotate the torso bone (which the hand bones are descendents of) the ‘stabilizing’ hand moves twice as far as it should, losing it’s grip on the gun. It seems to have an additive movement of both it’s parent, and the child of constraint? That’s my best guess as to why it’s happening, but I don’t really know.

I’ve been thinking on this for a while but no epiphanies yet, so any suggestions for how best to solve this would be greatly appreciated:-)

I think you’re right that the stabilizing hand bone is getting hit with dual transforms that are somehow additive.

An approach I’ve used for hand “pinning” is to make the wrist (i.e., the base of the hand bone) the end of an IK chain that uses another bone for its IK constraint target (control object). This bone is slaved to an Empty via a Copy Location constraint. When the IK constraint is fully enabled, moving the Empty moves the hand around, or in most cases, “pins” it to a certain spot. When the hand needs to move again, I disable the IK constraint and use FK.

So, if you do something similar with your stabilizing hand/wrist, you can make the rifle a parent of the Copy Location target Empty, and when the hand needs to stick to the rifle, enable the IK constraint. The hand will stick to the empty & thus to the rifle.

If you set up the IK chain correctly you can still use FK to keyframe the hand orientation if it needs correcting when the rifle moves about.

With IK, the bones in the chain are governed by the IK target motion rather than parent bone motion, so your hand won’t inherit any transforms from the other bones.

Hi,

Thanks for the suggestions. I walked through your approach on a test armature, and also your comments about how IK works got me thinking of the problem in a fresh way.

I ended up adding child of constraints to both hands (which are IK targets) and constraining them to the rifle. I then disconnected the bones and gave them a null parent (that’s where the extra unwanted movement was coming through when rotating the torso), so that they are only getting their movement through the rifle, and lastly, I parented the rifle to the torso bone, so that the rifle and the hands rotate and move with the torso when needed.

sweetness, now it’s working great. Thanks again.