- Home /
How do you turn on Ragdoll physics mid-game?
Is it possible to turn on ragdoll physics mid-game when the player loses through scripting? For example, say a character is running a skeletal animation. Can he suddenly have the ragdoll physics activate for him?
Answer by Hristo_Kalinov · May 16, 2020 at 06:51 PM
Ragdoll physics turn on when you turn off the Animator Component gameObject.GetComponent<Animator>().enabled = false;
You should attach Animator Component to your enemy and turn it off with this script. You can turn off the Ragdoll physics when you turn on the Animator gameObject.GetComponent<Animator>().enabled = true;
Hope this was helpful.
Your answer
Follow this Question
Related Questions
remove this post 3 Answers
How should I make a animate fully physics based Active Ragdoll? 0 Answers
Model not translating along its position with Animate Physics option enabled. 0 Answers
Making characters strike poses when hit? 2 Answers
How could I achieve Active Ragdoll effect like Overgrowth in Unity? 0 Answers