- Home /
Use AddForce with Animations??
I'm pretty sure you can't use rigid bodies with animations enabled, so I was wondering if there was a simple way to use rigidbody.AddForce with animations playing. Does anyone know if there's a way? I'm trying to make knockback on my gun. I've got knockback and ragdoll physics working once he dies, but before that, how would I do knockback without making a custom animation for each "knockback" (like one from behind, front, left, right, etc)??
Answer by Kavorka · Mar 23, 2014 at 08:37 AM
You can have something similar to this by using AnimFollow and a custom RagdollControl. Make is so that when the character is hit you lower the strength of the ragdoll so that you may knock it away. Then after a short time of being a weak ragdoll you reorientate the master to the ragdoll´s position and lerp the strength back on.
If you want you can lower the strength only on the body parts adjacent to the hit and you do not have to go to zero strength.
It would be A$$anonymous$$AZING if while searching for solutions to this problem, I didn't always come across you're sales pitches, and ins$$anonymous$$d found effective discussions and assistance being provided.
Your answer
Follow this Question
Related Questions
Animate Physics. Moving a rigidbody with an animation 0 Answers
Animation causes rigidbody to move 0 Answers
How do you move a character with physics when using Animator.setInteger to play the animations? 0 Answers
Rigidbody.velocity seems to be breaking jumping physics 0 Answers
Rigidbody should ignore child collider 3 Answers