Changing parent constraint object (to switch a held object between hands)


#1

Hi there. I am puzzling over this- I have a bone constrained to the left and right hands of my character rig. It represents a held object. I can make the object swap which hand it is attached to by using a set driven key to swich which constraint target is active, but if either hand has moved when I switch it, it hasn’t updated the offset and so the object jumps into mid-air.
When I am animating, I can get around this by going into the attributes for the constraint, and updating and keying the offset manually. I don’t want to have to ask the animator to do this though. Is there a way to make make the offset update automatically, or to add the update to the set driven key?


#2

HI
Try !
parentConstraint the rtHand_obj to rtHand as well as the ltHand and the same with the ltHand_obj.
You will get the parentConstraint weight shared as rtHandW0 and ltHandW1 , set the corresponding required weight 0 and 1. So it it stay with the particular hand.
You can animate this rtHandW0 and ltHandW1 in the range of 0 to 1 to swap the object between the hands.
Regards,


#3

Thanks!
I’m pretty sure my current set up is as you say. The problem is that the offset from each hand is set when the constraint is made. The result is that if the hands have moved in relation to each other when I change the weights, the offset is still at the original value.
For example , if I set up the constraint with the character in a ‘T’ Pose, the hands are in a different position relative to each other when in an animation it passes the object from one hand to the other. As soon as the weight of rtHand is 0, the object jumps to the position it was relative to ltHand during setup, which floating somewhere in mid-air.

There are two ways around this I have worked out, but neither is what I am looking for:
One is that every time I change the weights during an animation, I also go into the attributes panel for the constraint and push the ‘UPDATE’ button followed by the ‘SET KEY’ button. I prefer that the animator doesn’t have to do this. Ideally I would find a way to have Maya do this automatically when the constraint is change via the driven key I have set up.
The other is that I don’t bother with the constraints at all during rigging, and have the animator apply constraints when needed in the animation. I prefer not to make the animator do this either, and it would present the same issue if the object gets passed back to the original hand.


#4

Hi
If the object is not having control then parent to a locator then constraint the locator to both hand and switch the constraints weight between hand. The path of objects transition can be the locator’s path , which shold be keyed. It’s mostly done during animation.
Regards


#5

If you’re able to use scripts where you’re at, the best script for dynamic parenting(which prem described correctly) is zvParentMaster and can be found here. However, I would say understanding what goes on under the hood by doing it manually can be extremely beneficial. Here is a link to the script and help documentation.

http://www.paolodominici.com/products/zvparentmaster/