- Home /
Rotation resetted on start
I insert an NPC prefab in a scene and i rotate it to 270,0,0 (using the editor). There aren't any scripts attached to this prefab yet and when i press play to test how it looks like the NPC is rotated to 0,0,0. Any idea about why it happens?
Edit The npc's model is animated using mecanim :)
Answer by TheKusabi · Aug 25, 2013 at 02:42 PM
Then it is most likely the animation. Try removing the start animation, see if it works, if so then the animation is starting at 0,0,0 world rotation.
I often place animated GameObjects inside an empty GameObject. This makes the animation relative to the Empty GO's position / rotation. You can then set the parent GameObject's rotation to 270,0,0 and the animation will start from there, instead of 0,0,0.
Good Luck.
Your answer
Follow this Question
Related Questions
Keep the scene view rotation of my camera in play mode (it resets to 0) [EXAM ^^] 1 Answer
Smooth reset rotation problem 1 Answer
Rotation Reset 0 Answers
Public Variables in MonoBehaviour Scripts reset to "None" in Playmode 0 Answers
Orbit around player, but allow re-centering of camera via button press? 2 Answers