Navmesh Cut inverted when not using radius expansion (boundary condition)

  • A* version: 5.3.4
  • Unity version: 2022.3.51f1

Just updated versions today & I’m getting weirdness with Navmesh Cut & box shape
image

The chairs in the screenshot have NavmeshCut box shapes with “use rotation and scale”, “cuts added geometry” & “Radius Expansion: Dont Expand”

If I change the radius to Expand… they both appear to be working:

… but it’s not actually making the other one work properly, it’s probably a symptom of the order they get processed. If I expand the other chair’s radius instead of this one…
image

This appears to be caused from a boundary condition.
The boxes have a height of 0.5 and a center with y=0.25
image

… so they’re sitting exactly against the ground collider.
If I make the height sliiiiiiiiiightly higher, at 0.500001 it overlaps enough with the ground to not have the problem.
(but 0.5000001 is still too small & still gives the problem. At least in this specific scene.)

Lifting the center of the cut instead of changing the height gives a slightly different result…
It needed a larger change before the problem vanished. I had to raise it to 0.251, at 0.2509 it still showed the inverted result.
After raising the center it stopped cutting outside the box & managed to cut half the interior.
image

… I’m assuming that is correct behaviour, as the cut is technically above the navmesh.
As I increase the center more, I see that cut shrinking (which is expected if it’s moving away from the navmesh)
It needs to rise to 0.29 before the cut completely vanishes, but anything over 0.251 “works” and doesn’t cut outside of the area.

It works the other way around, too. Lowering the center to 0.2499997 or below “fixes it” & 0.2499998 or above gives this inverted bug.
(Presumably because the box is overlapping the navmesh enough & far enough away from the boundary)

Hi

I haven’t been able to replicate this. Can you replicate it in a test scene?

I’ve managed to replicate it! (& emailed you)
Unity version 6000.0.42f1 (I first spotted & confirmed it in unity 2022.3.51f1)

The test scene is a little more chaotic than I wanted, because it seems to need specific situations before it replicates…

  • Appears to need a sloped area, so the navmesh isn’t completely flat. (If it’s flat, it doesn’t cut the navmesh when the collider is exactly touching, you need to make it larger to force overlap)
  • The sloped area alone isn’t always enough. For some reason, replacing the current floor (that’s made from smaller tiles) with a single large box collider changes things enough that it doesn’t replicate.

Ive put the Navmesh Cut component on NavCutTest/Colliders.
It has a center of 0.51 - and in this specific scene it creates the issue where it cuts the area outside the cut:
image

… if I change the center to 0.5, it only cuts the navmesh inside the NavMeshCut
image

I’ve included two scene files: WithStrippedArea and WithoutStrippedArea. The only difference between them is changing that value from 0.51 to 0.5.

I’ve also saved the top graph as IncorrectGraph.bytes with the node data, in case that helps.