Mecanim to ragdoll and back to Mecanim?

Has anyone figured out how to go from Ragdoll back to Animator/Mecanim yet?

Going to ragdoll is easy - switch off isKinematic on the various rigid bodies in the model, and disable the Animator. The problem is that simply doing this in reverse causes the model to instantly jump to the animation without any form of transition. Not to mention the root rotation/position is changed dramatically, so the new animation plays with the model lying on the floor :slight_smile:

I thought I could be tricksy and make it play a “dead” anim - I made an animation take with no keys in an override layer - then fade that layer out, but it didn’t work. It treats a no-keys animation as whatever position the model was in before the Animator was disabled.

So is there a trick to this?

Right now it’s looking like I’m going to have to create a mini-animation script to blend the bones positions from their ragdoll positions, to the first frame of the “getting up” animation, then activate the Animator at that point. I don’t particularly like this method, as it’s messy and will require sampling the bones positions from the start of each “get up” animation for every character that needs it.

i’m sitting on the same boat as you, normally it just flops right over when i disable the animator. the only think i can think is getting the bones transforms and go from there lol.

I’d also be interested in a way to do this

Yep, I want exactly this too.
Auto Ragdoll was on the Mecanim road map from a year ago but I guess it still hasn’t arrived yet…
Hey Damocles, did you write that script? Did it work?

Not yet, I’ve been putting it off expecting it to be part of Mecanim, but we all know how that’s working out.

I think I saw something on the asset store that does the same thing, but I can’t remember it’s name off the top of my head.

1 Like

I believe you will all find this incredibly interesting:

Thanks for the link, rcober. Looks like exactly what I was planning on making myself - so that should save me a good number of hours.

I see this thread still is frequently viewed.

the initial link has a project that isn’t compatible with the unity of today, and the one posted above my comment links to a channel that doesn’t show how to do anything.

were you tricksy and false? like if you get it.

Please stop necroing threads.