How to make navmesh agent smarter in unity 3D?

60 Views Asked by At

I want to create zombie enemies that chases the player, but the thing is when an enemy hit an obstacle like a wall it does not go around it, How can I make it navigate through obstacles ? Do I need to use ml-agents? is there a way to make the navmesh agents smarter?

I am using navMeshAgent.SetDestination(player.position) to chase the player.

1

There are 1 best solutions below

0
Andrew Gotow On

The NavMesh is designed to take static objects like walls into account when pathfinding. If you're not seeing NavMeshAgents avoiding walls, make sure the walls are tagged as "Navigation Static" so they are considered as part of the NavMesh generation.