Is there any confusion between world and local coordinates in the script? You might need to use transform.localPosition to position the child objects, rather than the usual transform.position (which works in world space).
Yes, i create simple project to demonstrate this bug.
But, i found other way: my ragdoll object is still activated after start game in far position and after death player i only setup all transforms and deactivate player.
I found a solution to your problem (I post it even if the thread is old). The problem is that you must first enable the parents bones before the children. SetActiveRecursively activate before the children. To resolve this problem you can use this function:
NickRichards, thank you so much for that - the inability to safely deactivate my ragdolls until I needed them was absolutely killing me.
At first, your solution didn’t quite work for me, but I realised it’s because my joint hierarchy doesn’t quite match my object hierarchy: in a few places (knees, elbows, etc) I have joints set up that aren’t actually parent/child relationships. By modifying your code a little bit to check for joints and to follow+activate their connectedBodies first, it all looks like it’s working now.
Hi. Regarding ragdoll transitioning, I wanted to let you know that our tool, the URG!, includes two classes, included in the free version of the tool too, to do exactly that, by means of a ragdoll prefab or by means of ‘kinetifying’.
Check my signature for direct access links (you will spot them easily down the page).