- Home /
Ragdoll Glitch When Spawn
So, I have created a NPC which when you kill, destroys itself and spawns a ragdoll. This works fine, but when I scripted all the ragdoll bones to spawn in the same place as the NPC's, it glitched. Without the bone position/rotation script the ragdoll works just fine, except is spawns in T stance.
Bone005.transform.position = FindTransformData ().GetComponent(transformDataScript).Bone005.transform.position;
Bone005.transform.eulerAngles = FindTransformData ().GetComponent(transformDataScript).Bone005.transform.eulerAngles;
That's the idea of the script I used. I also tried using localPosition, localRotation, rotation, but still glitch.
Any help would be much appreciated :) thanks
Up vote for asking a question that is following the guide in the FAQ. I think 1.png is corrupt. Cant help, terrible at rotations
By the way if edit the question you can enable syntax coloring by selecting the code and clicking the 1010101 button
Thanks, Linus.
By the way I ended up removing the code that changed the position/rotation of the arms (arms were the only bones having this issue) and adjusting the actual ragdoll prefabs arms to a position/rotation which appears more seamless when instantiating and replacing the actual NPC. Works alright.