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

Navmesh Generation on Tile world?

Discussion in 'Getting Started' started by ParkaSan, Nov 7, 2019.

  1. ParkaSan

    ParkaSan

    Joined:
    Sep 8, 2019
    Posts:
    2
    I've made this small map out of a bunch of cube objects, each tile is 1 grid square, and I'm trying to use the built in NavMesh feature to generate paths in all the non-blue areas for my AI's to wander around on.

    .. Only problem is it just keeps doing that one small area in the photo! I've spent hours trying to fix it myself but I'm quite new to Unity & game development in general so I'm a bit lost. Help much appreciated!

    2019-11-06.png
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    To get NavMesh to behave in such a situation you would need physics colliders blocking its path on all the non-blue squares.

    But a NavMesh is almost certainly not the best solution for this sort of situation anyway. You already have a grid world; just use the grid to constrain your agents.
     
    ParkaSan likes this.
  3. ParkaSan

    ParkaSan

    Joined:
    Sep 8, 2019
    Posts:
    2
    Thanks for the info! This was my first time ever going near the Navigation & AI area.. I wasn't aware I could just do that!