Im trying to create simple movement AI for GameObjects.
Each GameObject has NavMeshAgent
Vector3 destination = new Vector3(Random.Range(-walkArea, walkArea), 0, Random.Range(-walkArea, walkArea));
navAgent.SetDestination(destination);
That's what im trying to do. But my baked ground not flat, there could be Y axis up to 30-40.
So if there mountains around GameObject he just gets stuck and can't climb over.
What can i do about it? If i just navAgent.Move(destination), everything works fine. GameObject teleports on X-Z position without worrying about Y axis.
How i can do same thing but with SetDestination?