- Home /
Ragdoll physics going crazy on Activate
Hi, I have problems when I activate ragdoll on death. The Ragdoll going crazy for just a second, and then being normal. I disable collider, animator and AI script. I solved with set isKinematic from true to false, but kinematic mode disable physics when the character isn't dead and this is not what i need, because it's appear very unrealistic (a flying character, ehm...) i'm very frustrated about this, hope somebody can help me!
Is the collider disabled before the ragdoll is enabled? Failing that you could always switch is$$anonymous$$inematic from false to true for a single frame and back to false to stop the initial physics momentum.
Yeah, the collider is disabled before Ragdoll's activation. I just try to activate $$anonymous$$inematic for one frame, but i have the same bad result. foreach (Rigidbody rb in rbArray) { if (!onetime) { rb.GetComponent().is$$anonymous$$inematic=true; onetime = true; }else{ rb.GetComponent().is$$anonymous$$inematic=false; } }
ok... how about using a lerp to decrease the drag from a higher set amount in the foreach statement.
//drag is set to higher number e.g. 10
foreach(Rigidbody rb in rbArray)
{
rb.drag = $$anonymous$$athf.Lerp(rb.drag, 1, Time.deltaTime);
}
Your answer
Follow this Question
Related Questions
how do i go about making a ragdoll in unity? 3 Answers
Character Body Part Dismemberment 1 Answer
Crash Dummy Sim 0 Answers
Unchild object by pushing a key 1 Answer
How to add ragdoll on a model that has no "root handle" prefab together?? 1 Answer