Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

unity – navmesh – how to reduce space from colliders

My baked navmesh surface is avoiding a large space from the colliders.

enter image description here

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Is there any way to change that offset distance for Navmesh surface?

enter image description here

>Solution :

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 NavMesh Agent 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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading