Understanding Navmesh cutting

Hi,

Playing around a bit with Navmesh in a new project with the Recast graph, works great! I just have a few questions.

  1. I noticed Navmesh cut it’s only applied at runtime, but I dont really need that feature since my maps wont change dynamically. Is there a more lightweight version that is only applied once and doesnt use up resources during runtime, or am I then expected to create my own mesh with “holes” where the cuts go? :slight_smile:

  2. As I understand it Navmesh does not recognize obstacles like a grid graph where I can specify layer X to be an obstacle, and you need to either have holes in the mesh or use Navmesh cutting to represent obstacles?

  3. Is it a reasonable workflow to use recast + cutting during prototyping for fast iteration, then switching to custom meshes with holes where my obstacles go for the final version to improve performance?

  4. I want really precise movement and will have quite small maps with very few agents, so I’m not too worried about performance. Which settings should I focus on with Navmesh graph and RichAI to really get the most precise movement possible?

  5. Does RichAI work with RVO?

  6. Are there any docs on how to add penalties or tags using a navmesh?

And one final question I just noticed:

How come my agent can walk through this gap even tho his radius is clearly bigger?

For a navmesh graph, you are expected to make your own holes. If you want to bake it into the navmesh automatically, use a recast graph.

If you need that, use a recast graph.

A recast graph doesn’t really have a higher overhead compared to a navmesh graph at runtime. You can cache the graph to avoid the scanning cost at startup. See Saving and Loading Graphs - A* Pathfinding Project

Yes

It’s tricky since the triangles are so big. But in general it works exactly the same way as with other graphs.
I’d recommend using the beta version for better accuracy.
In the beta version you can also use the RecastMeshObj component with recast graphs to much more robustly apply a tag to the graph.

Use the beta version with the FollowerEntity component instead. It’s a bit more precise.

The navmesh bakes in the radius of the agent. The navmesh should represent all points on which the center of the agent is allowed to be.

The navmesh bakes in the radius of the agent. The navmesh should represent all points on which the center of the agent is allowed to be

Thank you, I dont quite understand the above though, how do I change things so he cannot walk through gaps bigger than his radius?

If you make your navmesh manually, you would remove that part of the navmesh manually.

The agent’s radius is not considered during pathfinding. It is considered baked into the navmesh.

Ah okay, have to re-wire my brain from the grid-graph thinking it seems :smiley:

I will download the latest beta and try out the FollowerEntity a bit, I’m correct in assuming I can keep writing “standard” GameObject MonoBehaviour stuff even with this component right? No fancy knowledge of ECS needed?

Why is there even a radius on the agent then since RichAI is only for navmesh?

Yes, that’s exactly right.

It is used for local avoidance, and for some internal heuristics. And for visualization of course.

1 Like

Thanks for quick replies, Ill keep experimenting :slight_smile: