Hi
I found that when using RecastGraph, the NavMesh in some areas couldn’t fit the terrain properly.
How should I configure it to make the NavMesh fit the terrain as closely as possible?
- A* version: [5.0.4]
- Unity version: [2022.3.9]
Hi
I found that when using RecastGraph, the NavMesh in some areas couldn’t fit the terrain properly.
How should I configure it to make the NavMesh fit the terrain as closely as possible?
Hi
By using tiles (see recast graph settings), you can split up the terrain into smaller chunks. This will make it follow the terrain much more closesly, and is strongly recommended when using open areas on an undulating terrain. The recommended tile size for most cases is somewhere between 64 and 256.
Hi
The recast graph will only subdivide triangles at either tile borders, or obstacle borders. So you can make it represent the terrain better by using a slightly smaller tile size.
I think the Achilles here is “as closely as possible”. Like Aron said you’ll want to start with tile size/voxel size (I believe cell size in your older version) but that comes with it’s own tradeoffs in performance naturally.
Is your world mostly static? If so you can also look into crafting your own Navmesh for use with Astar, using Navmesh Graph instead of Recast. Or bite the bullet and deal with a much lower tile and cell size.
To my knowledge these are your best options. There may be smarter options but this is all I can think of