Reputation: 1
In Unity 2D, I am using NavMesh Pro to add pathfinding to my enemies, but now matter how much I experimented with the inspector I couldn't get the enemies to go through 2 blocks that are 1 tile apart. The NavMesh draws itself correctly, but my enemy would just stop and search for alternative paths instead of going through 2 blocks. My system only works when blocks are at least 2 tiles apart.
My enemy stays there even though there is a possible path between those 2 tables
Here is the NavMesh agent component in the enemy
Here is the Navmesh obstacle component in the table
This is my NavMesh object
I tried changing the radius of the object, and switching to the navmesh modifier component with not walkable enabled, but that didn't work either so I'm currently using the NavMesh obstacle component, which is more effective since my blocks spawn at random positions and this component adjusts them to the NavMesh.
Upvotes: 0
Views: 26
Reputation: 90714
Reduce the Radius
settings for obstacles avoidance on your agent .. it requires "at least" 1, the rest is just inaccuracies.
so rather make the radius e.g. 0.8 or something similar
Upvotes: 0