Animating constraint's activation

Hi!!

I was considering weld constraining an object to a hand (a ball for example) then animating the enable attribute to perform a nice throw.

Animating the attribute is not a problem, but the constraint does not change states, making the ball not to leave the hand.

Am I doing something wrong?

Thanks for reading!
Juan

You’re right! The Weld constraint is permanent and not editable. It’s meant to physically weld two markers together.

To animate the activation state connection, have a look at the Distance Constraint, where you can animate the Stiffness from 1 to 0.

Generally, when Enabled is Off on any Ragdoll node, it will act as though that node was deleted. It is a non-destructive way of disabling nodes, especially if those nodes are from a referenced scene.

In 2022.01.17, you’ll get a notification about which attributes can or cannot be animated.

Understood for the Weld constraint and the Enable attribute as well.

The problem with distance constraint is it works on translation, but leaves rotation free. I can always use three non aligned distance constraints to define a plane, thus preventing rotations, but I do not know if it is a good solution.

Using multiple distance constraints is a fine solution, let me know how it goes. :slight_smile:

I used three distance constraints to hold a stick in the character’s hand, then making him release the stick when pushed away. It worked.

However, the efficiency of this resides in making parent and child constraint pivots to be exactly in the same position. Otherwise, the grip looks loose.

Matching the pivots is somehow challenging. Is there an easy way to make both parent and children pivots match?

Hm, does not not suffice leaving the default Distance = From Start? It should try and preserve whatever distance exists between the two markers at the start of the simulation. If you upload a screenshot of what you are seeing maybe that can help my understanding.

Alternatively, you could try a Distance = Maximum with a Maximum = 0 to have the two pivots snap together.

This is how I was trying it: Three distance constraints with Maximum condition set to 2. The reason not being 0 is cos asking the three of them to be 0 forced the solver into an impossible condition.

But in the end I have found a simpler approach with gives me what I was looking for: I Maya parent constraint the object to the hand. Then animate the marker from kinematic to initial state the frame I want the hand to release the object.

I think i was over complicating the procedure.

Thanks for the help in understanding how the constraints work.

1 Like