NavmeshCut and custom mesh

Hello all,

We are currently using a recast graph and some navmesh cut here and there to cast out zones around our units.
We were using the circle type with a radius. Yet it appears that using circle cuts the navmesh through walls. Which is completely normal. Yet since we wanted to avoid that we found a way to generate a more accurate mesh that takes into account the walls. Once this mesh is generated we fed it to the navmeshCut.

Unfortunately, it looks like the navmesh is not cut accordingly to the specified mesh. We tried with a plane-ish version and a more volumetric version of the mesh (plane version extruded).

The navmesh cut is set to custom mesh with mesh scale set to 1.

Is there some extra steps we are missing ?

Any help would be appreciated.




The navmesh cut will accept a mesh looking something like this

It will trace the border of the mesh and generate the contour from that.
However make sure that all normals on it are smooth, that there is no UV information (or just projected from the top if it is not possible to remove it) and no other things that could cause unity to split vertices (like vertex colors).

Also. You should not put navmesh cuts on the units themselves if they are using pathfinding. That will confuse the units because wherever they go they are always outside the navmesh.

Thanks a lot aron for the quick response.

I changed the generated mesh to be filled (I only add a contour, like just the contour of a cylinder).
Also since the mesh changed I added a function to force the contour from navmeshCut to be regenerated. (contour = null)
Units cutting the navmesh do not move when their cutter is active.


1 Like