Disabling Kinematic on hit

I made a character with “Rigidbody” on each piece and made them all “Character Joints”. “Is Kinematic” is turned on each body part to prevent them from going into the ragdoll state.

What I would like to do is make the entire body turn off “Is Kinematic” when a force hits it.

-I read “Sometimes you want an object to be under physics control but in another situation to be controlled explicitly from a script or animation. For example you could make an animated character whose bones have Rigidbodies attached that are connected with joints for use as a Ragdoll. Most of the time the character is under animation control, thus you make the Rigidbody Kinematic. But when he gets hit you want him to turn into a Ragdoll and be affected by physics. To accomplish this, you simply disable the isKinematic property.”


Can anyone help?

I’m having trouble understanding the root of your question. Is it simply how to iterate through your object and turn off the isKinematic flag?:

rbs = gameObject.GetComponentsInChildren(Rigidbody);
for (var rb : Rigidbody in rbs) {
	rb.isKinematic = false;

if u use the animator controller the ragdoll goes deactivated when u disable the animator controller