Navigationagent2d keeps geting stuck on corners

Godot Version

4.4.1

Question

my navigationagent2d keeps geting stuck on corners and tryes to go throug gaps that dont exist is there a way that i can fix that by maby making it so it has to stay a certend distance from the wall im using a tile map for the collisions and the navigation regan
if you need more information i will send it

You need to offset your navigational geometry from walls. Navigation system is oblivious towards colliders so you need to make sure that any position within nav geometry is collision-less in respect to agent’s physical representation.

1 Like

but how do i do that with a tile map?

Adjust border size in nav polygon before baking.

so i have to make a navigation polygon instead of using the navigation layer

You can draw navigation polygons manually per tile and adjust them so that an agent never touches actual colliders. Baking may be less tedious though but it really depends on your game type and tile usage.