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

nav mesh exclude areas

Discussion in 'Navigation' started by Tom163, Mar 28, 2015.

  1. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    I'm working on a simple game where creatures move only in the center area of the terrain I have, because the outside part of the terrain is just for background.

    I can't figure out how to exclude the unused areas from navmesh generation. I can block them off with invisible static blocks so the creatures will never move there, but this only creates a small exclusion zone at the edge of the mesh, not in the interior.
     
  2. Yash987654321

    Yash987654321

    Joined:
    Oct 22, 2014
    Posts:
    729
    I am also wanting to know about It but I cant figure Out anything. But now Simple A* By BFGamer is free which is a grid based soultion that solves my problem but I dont know about your case
     
  3. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Check out navmesh cutting. or just slap your own mesh on that area for the scans.
     
  4. SeasiaInfotechind

    SeasiaInfotechind

    Joined:
    Nov 17, 2014
    Posts:
    32
  5. sarahnorthway

    sarahnorthway

    Joined:
    Jul 16, 2015
    Posts:
    78
    It's still in beta, but you can now use NavMeshModifierVolume from Unity's GitHub project NavMeshComponents to mark sections of a terrain as not walkable. To do this:

    • Install the components from https://github.com/Unity-Technologies/NavMeshComponents

    • Add a NavMeshModifierVolume to your scene and set the area type to Not Walkable

    • Add a NavMeshSurface to your scene (defaults all scene objects to walkable)

    • Bake via the NavMeshSurface, NOT Unity's built-in Navigation panel
     
  6. MikeTheMonster

    MikeTheMonster

    Joined:
    Sep 20, 2018
    Posts:
    2
    A little late, but you should simply select the unreachable areas and set their Navigation Area (under Object tab) from walkable to not walkable.
     
    eikenuro likes this.