Hello!
I’m having an issue with the ragdolls inside Unity. I’m working on a game where the player is able to pick up an enemy and smash or throw him away. This enemy is composed out of 3 prefabs. The master prefab holds the enemy script that controls all the AI etc. The other 2 prefabs are the models. The first one is an animated model and the second one is the ragdoll model. We use 2 different prefabs because we need to be able to disable the ragdoll one for performance.
Now, when the ragdoll is thrown away, we make the ragdoll prefab inactive (using SetActive) and we enable the animated prefab. We also reposition the ragdoll prefab to it’s original position (reset the local and world positions and rotations). The problem is, the ragdoll itself isn’t being properly reset. It still has all it’s rotations and local positions differences (because of the spring values).
I cam across this topic (http://forum.unity3d.com/threads/202510-Cleanly-resetting-a-ragdoll) and I tried some of the solutions. But none of them help. Is there a way to reset the rotations and positions of a ragdoll skeleton back to it’s initial values. Saving the rotations and positions and overwriting them (local positions and local rotations) doesn’t seem to do the trick. Also, I’m not able to use PrefabUtility because we need to be able to do this at runtime in a builded version.
Thank you in advance