- Home /
Character Controller to Ragdoll when HP = 0
I setup a ragdoll using the wizard it works fine. My problem is when I have a character controller activated. I want the character to act normally until it's HP == 0, then it ragdolls. This is much more complex than I bargained for.
When HP ==0, I tried setting character controller.isTrigger = true and setting the RigidBody.isKinematic component for each ragdoll bone to true (from false). The character controller stays in place no matter where the ragdoll goes and the ragdoll acts strangely.
What is the standard way of activating a ragdoll?
Answer by jb777 · Oct 23, 2011 at 08:24 PM
I hate to answer my own question but heres what I found with some research.
http://download.unity3d.com/support/resources/files/FPS_Tutorial_3.pdf
A ragdoll prefab needs to be created. It is separate from your regular alive object. When HP == 0 delete the regular alive object and instantiate the ragdoll prefab in its place. I havent tried it yet but it should work. (I hope).
Answer by The-Arc-Games · Oct 29, 2011 at 09:48 AM
Our tool the URG! has a built in class to do just this with very simple steps. It's even available in the free version.
Additionally, you can even choose to create a kinematic ragdoll, and we provide a specific class for transition for those cases too, if you want to have a physics gameobject instead of a transitioning one.
Your answer
Follow this Question
Related Questions
Ragdoll driven game 1 Answer
How to ignore ragDoll collision with the character controller 1 Answer
Transition from 2D bone-based animation to ragdoll? 1 Answer
How to stand up from ragdoll 0 Answers
Ragdoll's flying 0 Answers