admin管理员组

文章数量:1123432

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?

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?

Share Improve this question edited 13 hours ago anderlaini asked 13 hours ago anderlainianderlaini 1,8093 gold badges28 silver badges48 bronze badges 2
  • 2 Have you configured the Radius accordingly? By default it is 0.5 which about matches your posted image ... – derHugo Commented 13 hours ago
  • @derHugo added the navmesh component settings. how can I change the Radius config? – anderlaini Commented 13 hours ago
Add a comment  | 

1 Answer 1

Reset to default 2

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.

本文标签: unitynavmeshhow to reduce space from collidersStack Overflow