Search Unity

NavMesh generated with impassable seams. NavMeshObject carving issue?

Discussion in 'Navigation' started by kyled, May 7, 2021.

  1. kyled

    kyled

    Joined:
    Feb 21, 2018
    Posts:
    2
    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 :
    https://gyazo.com/c83272a9070c8dfd4572d04d814e6f2a



    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.
     

    Attached Files:

    Last edited: May 7, 2021
    shasaur_unity and AntonPetrov like this.
  2. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    268
    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.
     
  3. kyled

    kyled

    Joined:
    Feb 21, 2018
    Posts:
    2
    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.
     
  4. AntonPetrov

    AntonPetrov

    Joined:
    Dec 27, 2013
    Posts:
    64
    Why does Unity ignores this?
    We have a lot of these bugs when slightly moving an object creates a seam it breaks the game!
     
  5. mark-shin

    mark-shin

    Joined:
    Apr 20, 2014
    Posts:
    13
  6. shasaur_unity

    shasaur_unity

    Joined:
    Jan 20, 2019
    Posts:
    1
    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