Moving to a destination and looking into another direction using NavhMeshAgent
I'm trying to let an enemy move to a certain destination but let him look into a different direction. The problem is that the NavMeshAgent is always turning my enemy into the direction it is moving to. So basically every time I'm trying to change the direction of the enemy the NavMeshAgent will turn it back to the direction it is moving to.
Answer by project-tatsen · Dec 03, 2018 at 12:31 PM
Ok, since nobody answered.
In short, my solution was to set the angularSpeed on the NavMeshAgent to 0. This will disable rotation of the GameObject (be aware that there could be still some rotation due to physical forces applied to your GO). While the agent is moving I just set the rotation of the GO to my desired direction manually. To re-enable rotation to traveling direction (default behavior) just set the angularSpeed back to a value greater 0.