Replacing a rigged character with a ragdoll in the same pose?

Hi.

I want to replace my character with a ragdoll, once it’s health reaches 0. If I just instantiate or enable it, the newly instantiated or enabled ragdoll would be standing in T-pose or whatever pose the ragdoll is positioned in at start. How would one go about matching the pose of the ragdoll with the actual character before the character gets destroyed? Would I have to create two Transform arrays, one for the character’s and one for the ragdoll’s rig, and then iterate through with a for or foreach loop or something? The way this would work, would be to put all of the bones in the rig into each array, in the same order, and then set the positions and rotations manually at each array iteration. Sounds like a lot of work, and even more performance trouble. Is there a quicker way?

I know there is a Mecanim ragdoll animator state system in the works, but I have no idea when to expect it to release, and I don’t think delaying is a good idea.

Thanks in advance!

To get a nice transition you also need to transfer momentum to the ragdoll. Try this webpler and see if it is what you want.