Hi community, I’m new here, I’m learning unity functions, and I have a problem. I know do a ragdoll, but I don’t know make a ragdoll into a script, example: I want when I press a key, my third person does ragdoll, anyone knows? Thanks for read.
You can loop through all your rigid bodies in your game object (and children), and set isKinematic to false. That and disabling the animation component seems to be the gist of it.
Rigidbody[] bodies=GetComponentsInChildren<Rigidbody>();
foreach (Rigidbody rb in bodies)
{
rb.isKinematic=false;
}
GetComponent<Animator>().enabled=false;
Thanks!