NavMesh generated with impassable seams. NavMeshObject carving issue?

Our game allows users to place objects in the world for an amount of home customization. We use the nav mesh components for the movement of our users avatars. We’ve been getting reports of users experiences odd pathing or losing access to sections of their home when decorating. We’ve had trouble tracking this down until it happened to one of our dev accounts.

It seems like we are not the first to encounter this issue but to date I have found no solution despite trying everything I’ve found and multiple unity versions where the issue was supposed to be fixed. It is most certainly an issue in the components. I’ve replicated the issue in the sample project for the components themselves to rule out any issues on our end.

To reproduce the issue I used the 3_free_orientation scene and began adding nav mesh obstacles until I saw some double thick dark black lines extend between two of them. When this happens the Agent can no longer cross that line. On some computers it renders as a gap on other it just seems to be a line, I suspect that’s just an editor rendering glitch. You can see it in this picture :

Those lines effectively create a barrier to the agent.

Gif link :

If we change positions slightly the seams will go away but this is a large issue because our users are the ones placing objects and then losing functionality without any clear way of understanding what’s happened. We also haven’t found a method to detect the issue that isn’t some sort of mass pathfinding test.

I’ve attached the project with the issue in it. It is a copy of the github project I downloaded today with some carving objects added to the scene. If anyone has some sort of fix for this it would be greatly appreciated.

7119238–849853–NavMeshComponents-master.zip (9.26 MB)

2 Likes

Very weird problem. To me, it appears to be related to NavMeshSurface baking with too little accuracy and some overlap on the triangles, which I agree is a bug in NavMeshSurface baking. To resolve it for this particular scene was to decrease the voxel size to 0.125, giving a 4 voxel per agent radius result instead of the default 3.

If possible, you may play with this value based on setups your users have had this issue on and see if adjusting this value on your NavMeshSurface resolves the issue in at least most of the scenarios so they don’t experience the issue anymore.

This is more of a work-around to your problem though. I would recommend submitting a bug to Unity by going to Help > Report a bug and submitting this project to them there along with as much detail as you’ve posted here so they can reproduce and hopefully address the root issue.

Yes we attempted this but this simply moves the problem to some other combination of vertex. So while it may fix one users account it will break another. We actually attempted to increase the precision this way but the problem persisted just moved somewhere else.

Why does Unity ignores this?
We have a lot of these bugs when slightly moving an object creates a seam it breaks the game!

I have the exact same issue;

Because of the small gap, it behaves as if there is an invisible wall.

Does anyone know if this bug has been solved in a more recent version of Unity or the AI Navigation package itself? I’m still on version 2020.3.40f1 with AI Navigation 1.0.0-exp.4

For any future devs hoping for an answer to this (since it’s still an issue) with unpassable seams or invisible walls, the solution that works 99.9% of the time is to increase the radius of the agent in the navigation tab.

0.25 seems to be the smallest that makes it work with extremely low chance for ‘invisible walls’ to become a problem. Increasing it a little more might mean that it never happens.