Search Unity

NavMeshBuilder ignores sections of the terrain where the height isn't zero

Discussion in 'Navigation' started by Abbrew, Nov 17, 2019.

  1. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    172

    https://imgur.com/a/6udRozr
    The terrain's transform is at (0,0,0), and I've raised the terrain as seen in the image. When NavMeshBuilder. BuildNavMeshData is called, it ignores square sections of the terrain where the height isn't zero. Any idea on what's causing this?
     
  2. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    172
    Looks like it was caused by the localBounds field of NavMeshBuilder.BuildNavMeshData not being set properly. It was (200,0,200) before fixing the mistake - this caused any deviation from height zero to not be included in the NavMesh