A* Pathfinding Project

Recast tiles not connecting (with images)


I’ve been having a lot of trouble getting the settings right so that my Recast graph attaches in all the places it should.

Here’s what happens:

By increasing the Cell Size from 0.05 to 0.1, more of the graph is connecting:

In the above example, if I change Cell Size even slightly, up to 0.11 or down to 0.09, those navmesh slivers disappear.

These are my current settings:

(As you can see, I even tried messing with Max Slope, which sometimes helped with stairs and sometimes didn’t).

Any help/insight is massively appreciated!



It’s hard to tell from your images, but I think this is simply due to you having a too low resolution for your graph.

Think of the resolution like a pixel image, if you have just the right resolution it might be able to clearly see the corridor, but if it is nudged just a little bit the pixels for the corridor might overlap with the ones for the wall and then it doesn’t work so well. Try for example doubling the resolution, I think you will get a much higher quality navmesh then.

On the other hand, it might be because your character radius is quite high. While the default character controller radius in unity is 0.5 meters, that is quite a lot higher than an actual human being and it might make it hard for a person of that size to squeeze through narrow door openings or corridors. Try lowering it a bit and see if that helps.