My baked navmesh surface is avoiding a large space from the colliders.
For example, on picture above, I need my NPC to stays idle at the pink ball position, but Navmesh surface is not reaching that area.
Is there any way to change that offset distance for Navmesh surface?
Go to the Navigation Window (Window > AI > Navigation.) and adjust your agent's Radius
property according to your needs
Define how close the agent center can get to a wall or a ledge.
Alternatively you can also adjust this for each individual agent via the NavMeshAgent component
From About About NavMesh agents:
The height and radius of the cylinder are specified in the Navigation window and the NavMeshAgent component properties of the individual agents.
- Navigation window settings describe how all the NavMesh Agents collide and avoid static world geometry. To keep memory on budget and CPU load at a reasonable level, you can only specify one size in the bake settings.
- NavMesh Agent component properties values describe how the agent collides with moving obstacles and other agents.
Typically you set the size of the agent with the same values in both places. However, you might, give a heavy soldier a larger radius, so that other agents leave more space around your soldier. Otherwise, your soldier avoids the environment in the same manner as the other agents.