Why does my Nav Mesh Agent walk to the wrong side of its destination object?
I send a unit towards a tower to kill it (think tower defense). The map is open 3d, no lanes or wall blocking. The tower is a perfect rectangle.
Why does my unit always go to the left side of the tower even if start the unit from any other side? I want it to go straight to whatever side is ultimately closest.
Are there some bake settings I'm missing? There doesn't seem to be a way to set the "center"of the tower's mesh and control the destination that way.
This is how I'm moving my unit to the tower:
GetComponent<NavMeshAgent>().destination = targetenemy.transform.position;
I've found a way to force this issue to happen. If I set the tower's Y position to 10, the unit walks to one side. If I set the tower's Y position to 10.3 and re-bake, the unit walks to a different side. What's going on here and how can I control it?
did you ever find out how to fix this, i am having similar problems
Your answer
Follow this Question
Related Questions
Using Rigidbody physics to move an enemy with NavMeshAgent - De-sync issues 0 Answers
Offset NavMeshAgent Destination 0 Answers
Movement causing infinite loops in OnTriggerEnter and OnTriggerExit. 1 Answer
Need some example C# Syntax 0 Answers
Occasional NavMeshAgent gets stuck and goes the wrong direction 1 Answer