- Home /
GameObject with NavMeshAgent resets rotation when game starts
Hey, I have a GameObject with a NavMeshAgent component attached to it. When the game starts the GameObject's rotation resets.
Thanks for your help! Shawn
Did you set a destination? It always looks ahead when there is a destination.
Answer by Showny · Oct 11, 2015 at 06:51 PM
I found the answer myself, the model was imported from Blender (3D Modeling Tool), in Blender the Y axis is not facing up so the rotation on the "X" axis need to be "270" and the NavMeshAgent resets it when the game starts so I made the model the child of a empty GameObject and put the NavMeshAgent on the parent with no rotation. That fixes the issue!
*It's the same for any rotation on the model!
Answer by meat5000 · Oct 11, 2015 at 06:52 PM
Ah yes, old hat, sorry.
http://forum.unity3d.com/threads/blender-unity-rotation-fix.181870/
The latest versions of Blender have some kind of Rotation fix built in! (Experimental) Otherwise Mirgars fix works just fine.
Bodging in Unity will cause further problems.