NavMesh error on big mesh

Hi @Cedric , looping back to this as we are facing some memory issues with our navigation meshes. I’ll get OOM errors on it once in a while that cause my scene to freeze entirely, and we’ve been trying to track this down a bit better. One issue that we noticed is this one which we are curious for your take on, Apparent memory leak in RecastJS, but I’m curious about what you say above in this thread about the mesh simplification value being one of the properties that could be tweaked to not blow up the memory allocation.

We’ve got this going for our navMeshParameters:

let navMeshParameters = {
cs: 0.2,
ch: 0.2,
walkableSlopeAngle: 20,
walkableHeight: 4,
walkableClimb: 4,
walkableRadius: 3,
maxEdgeLen: 12,
maxSimplificationError: 1.3,
minRegionArea: 8,
mergeRegionArea: 20,
maxVertsPerPoly: 6,
detailSampleDist: 6,
detailSampleMaxError: 1
};

I know that bringing the cs will help us here, but how would you recommend tweaking the other properties?

CC @SirFizX

1 Like