So basically after an enemy NPC dies, it becomes a ragdoll, and from that point its pose is in hands of the physics engine. There’s a perk that allows player to reanimate corpses of enemies as zombies. Zombie is a different game object, that has an identical character setup but different scripts and sounds. The corpse object gets destroyed, zombie object gets instantiated.
The zombie needs to stand up from the ground, from exact place and pose the dead body was in.
The transform hierarchy of bones is identical, so I think i just need to copy positions and rotations of bones with identical names from the corpse to zombie.
I have a very vague idea of how to write this in code and some help would be great.
Thanks!