NavmeshCut on/near tile border remove valid connections

  • A* version: 5.2.2
  • Unity version: 2022.3.35f1

We’re randomly running into an issue with NavmeshCut, when they end up very close to tile borders, they sometimes disconnects the tiles from each other, causing pathing issues.
In our case, we generate the dungeon procedurally (at runtime), so its really hard to avoid the issue as we dont have perfect control of where they end up, or where the tile borders are.

Connection over tile border pre cut

Connection disappears when the cut is active (i.e. a procedural element is placed)

Interesting, I’ll tag @aron_granberg on this one. Tested with 2022.3 and 5.2.3 on my end, and the most I can get is that one connection going “nowhere”- I could get that pretty reliably but I can’t get one as broken off as the one you’ve got in the screenshot. Maybe that’s down to environment complexity?

Best I could get:

That floor is all one single object correct? Or are there any seems between two or more floors anywhere in your screenshot?

Its really hard to reproduce in a minimal setting. But we have a specific level/seed where it happens consistently.

The level is not super complex or large. The offending cutter is not super far from the world origin etc. Tried to capture as much info as possible in the picture above.

The cutter is also large/low enough to properly cut the navmesh

Could it be that the edges along the tile border end up to far from each other due to a new edge vertice being introduced due to the cut? Because if I zoom in far enough, the edges dont line up properly (… this is just a wild guess, we have other areas in where tile borders dont properly line up due to different vertex count along the edge, where the connections work as they should)

AHA!

I managed to create a minimal repro case (using 5.2.4)!

Is it enough with a scene file, or do you want the whole project to investigate?

Niiice! Yeah go ahead and scene the whole project just for the sake of eliminating variables :+1:

Heres a link to the project fie (zip)

I’ve removed Astar from the project, so you’ll need to add it yourself when entering “safe mode”
Hit play, and enable/disable the DynamicObstacle game object to se the issue in action.

@tealtxgr did you guys have any luck reproducing it using the linked project?

Hey sorry for the late reply! Yes this was perfect and it’s working (well, rather not working) on my end! I sent it over to @aron_granberg to have a look at :+1: Very much appreciate the project!

Hi

Thanks for the repro project!
I’ve managed to identify the bug, and implement a fix. It will be included in the next update.

1 Like

Wonderful to hear!