Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Navigation mesh generating under static objects - Is there a way to stop this?

Discussion in 'Navigation' started by CerberusInteractive-Morgan, Sep 5, 2016.

  1. CerberusInteractive-Morgan

    CerberusInteractive-Morgan

    Joined:
    Aug 25, 2016
    Posts:
    19
    Hello! for the most part the navmesh seems to be working great in our game, however on one level where we have large boulders/rocks sticking out of the terrain it is having some problems. Here are some screenshots:

    It seems to be working good from the outside:


    However, it also generates inside/under the rock, which causes some issues in the game (The units using the navmesh don't use it entirely since they also fly sometimes, so they can land inside of the rocks / spawn inside of the rocks):


    This is the first time I've used this, so sorry if I am missing something basic ;) ... Thanks for any help!
     
  2. CerberusInteractive-Morgan

    CerberusInteractive-Morgan

    Joined:
    Aug 25, 2016
    Posts:
    19
    Hello! So I have a fix, however its not a "real" fix. I was unable to figure out how to stop it from generating under it, but since it is an "outside" level, I just set the baked agent height to 10 instead of 0.2, and that seems to of stopped it from generating under the rocks (under anything at all now, but I am fine with that). :)
     
  3. JohnKonny

    JohnKonny

    Joined:
    May 17, 2017
    Posts:
    1
    I guess you solve this, most appropriate way how i solve this.
    Add NavMeshObstacle on your object, and check "Carve", then bake navigation, and there will be without walk path under the mesh.