Search Unity

Bug Zero size NavMesh polygons

Discussion in 'Navigation' started by CRG-Hans, Mar 22, 2023.

  1. CRG-Hans

    CRG-Hans

    Joined:
    May 9, 2022
    Posts:
    11
    We're running into an issue where the generated NavMesh contains near zero size polygons along the tile edges. As we're using the NavMesh as a framework to poll polygons near the player/npcs, these polygons causes issues. Is there any way to prune these polygons from appearing. As they only appear along tile edges it feel more like a bug than working as intended.

    See image for reference
    upload_2023-3-22_11-32-34.png

    Another issue we've run into is tied to the NavMeshQuery system. Getting vertices from two adjacent polygons on the NavMesh produces vertices that are near, but not the same, even when they share the same exact edge. The distance between the vertices is enough for the default Vector == operator to fail. Instead we need to rely on a Vector3.distance() check to determine if they are indeed the same vertices.