How to throw and catch

So I have a scene where my character is throwing a ball against a wall and catching it.
My first thought was to setup a pin constraint and key the translate/rotate stiffness to 0 when I wanted the ball to be thrown.
However I couldn’t get the ball to respect its previous velocity. On the frame where I key the stiffness to 0, the ball simply drops immediately as if initialised in this position.
I then tried to key the behaviour from kinematic to dynamic. This works well, and the ball is thrown. But it makes catching the ball difficult. If I key from dynamic back to kinematic there is a pop and it’s hard work getting the forces just right so as to minimise this pop (and potentially fix the pop by hand after recording simulation).
Just wondering if anyone had a better solution, than I have been able to come up with?

Hi @_ed and welcome to the forums! :partying_face:

I know what you mean, and it’s a common expectation that I wish could work. But what you instead need to do with that Pin Constraint is to put it either on or behind the wall, such that the ball gets pulled towards it. Then, as it’s heading towards it, you can animate Translate Stiffness = 0. That’ll maintain the velocity it’s having at that time and throw it towards.

To catch it, you’d do the opposite. Parent constrain the Pin Constraint to the hand, and animate it on when you want the ball to head towards the hand.

Play with the Damping values too, in this case it might make sense for them to be 0. Else the ball will slow down prior to reaching the pin location.

Just checking in on this, did you manage to make any progress on this @_ed?

Here’s what I think you are seeing.

At first, the ball flies backwards even though it really should fly forwards. Then towards the end, I drop the Translate Stiffness enough such that by the time it animated to 0, the Pin Constraint is still ahead of the Marker. And that’s the key.

Transitioning from simulation back to animation is a balancing act between artistic vision and realism. The closer your vision is to reality, the smoother the transition. Here’s an example.

Here, the natural trajectory of the ball is different from where I’d like it to go. So last minute, I animate this Pin Constraint to pull the ball towards the position I want. In this case, I’m asking it to come to a halt in the air, which means I need to decide whether I want any recoil or bounciness to the catch. In your case, perhaps, you have contact with a catching hand or the like.

Is this what you were looking for?

1 Like