A* Pathfinding Project

Terrain edge jagged


We’re using a recastgraph on terrain, but edges where the terrain is too steep are very jagged (see images below), leading to weird behaviour when trying to walk there
Digging through the code, the resolution of the recast mesh for the terrain is directly influenced by the heightmap resolution, turning it up helps a little, but is still not really satisfactory
with 513:

with 1025:

Is there any way to get a smooth edge?
Setting the max edge error higher with the higher heightmap resolution helps with the worst “spikes”, but it’s still not really good and reduces detail in other areas where we need it

I did try briefly messing about with the terrain rasterization to make a fake high res mesh aswell, but that just broke the navmesh generation completely (good chances I messed something up) and seems more like a bandaid than a proper solution aswell.