Recast Generation Error?

Hi,

For some reason with the latest version I get occasional errors like this:

here is another image, on the left is then same gap as in the above picture. I thought initially it might be because it happens to align where one of my terrain physics meshes meets another but you can see a similar gap on the right:

I don’t recall seeing this before i updated to the very latest.

Any ideas what might cause it? I have tried rescanning. Bulldozing the trees so that there are no unnavigable areas for that tile solves the problem so it’s something to do with the generation.

Thanks,

Hi

This is expected at tile borders sometimes. It should not be a problem. The agents should be able to path over this gap without any issues.

You can reduce the likelihood of it happening by adding more obstacles to the graph (in both tiles).

Hmm,

The agents do appear to come up against an edge and get stuck in my case. I’m setting the agent nav targets to a position on the nav mesh itself.

In the beta I know I’ve fixed a rare case where this could lead to an agent not being able to navigate across the gap. You could try that out and see if that works better. See A* Pathfinding Project

I’ll give it a try.

Just to be absolutely clear about something - should i be setting an agents nav target to a position on the nav mesh or a position on my terrain? The issues i had with setting the nav target to the terrain itself was that there were occasions where the nav mesh deviated a lot from the actual terrain and some places they should be able to get to were unnavigable.

The solution i found for that was to have the nav agent code always navigating on the nav mesh and to snap the visual representation of the agent to the actual terrain.

Thanks again,

Ah, 4.3.61 is the absolute latest where i see it.

Either one should work. Though if your navmesh deviates a lot from your terrain, you may want to ensure that A* Inspector → Settings → Max Nearest Node Distance is large enough to account for the deviation.

Interesting.
Would you mind posting a screenshot of your graph with the Connections gizmos toggle enabled on the recast graph?

Maybe this is useful, without my rendering: