Search Unity

NavMesh2D - Navmesh generation and navigation for your 2D projects [RELEASED]

Discussion in 'Assets and Asset Store' started by Pigeon Coop, Feb 27, 2014.

  1. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    NavMesh2D for Unity
    Asset Store ($15)

    $1.png
    Click to enlarge

    NavMesh2D is a tool to generate and navigate navmeshes for 2D projects. It is designed to work very similarly to the built in Navigation tool which unfortunately doesn't work in 2D.

    It is priced at $15. It isn't packed with the more advanced features (dynamic obstacle avoidance, runtime mesh generation, etc) but it is still extremely useful for small to medium projects - great for things like top down games (thing GTA), small strategy games (think FTL), etc.

    It is quick and easy to set up your navmesh with NavMesh2D. You can generate your navmesh in 3 steps - specify which layer contains your floors, specify which one contains your walls and hit bake.


    Features




    Seamless Integration
    The tool does not use any special colliders or 'helper scripts' that need to be attached to objects around your scene. It works with Unity's built in colliders (Box/Circle/Polygon). Your gameobjects will get processed if they are a 2D collider on either the floor or wall layer. Thats all there is to it!



    Tolerant
    NavMesh2D is extremely tolerant of overlapping colliders and 'messy' scenes. You don't have to be 'pixel perfect' with all your placements. NavMesh2D will collect all of your colliders and crunch away on that data to spit out a clean navmesh.


    $3.png


    Full Control
    You have full control over how much padding should be applied to the navmesh and you can also pick from 3 different corner/edge types. You can also bake a grid with a specified resolution into your navmesh to improve path finding results.



    Off-mesh Links
    You can link any number of navmesh islands together. These links can be toggled on and off or even moved around at runtime!



     
    Last edited: Mar 5, 2014
  2. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    A 15 minute video that walks you through your first navmesh! A tutorial video :)

     
  3. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Workflow tutorial for 2DToolkit users!
     
  4. MarioRuiz

    MarioRuiz

    Joined:
    Nov 7, 2009
    Posts:
    161
    Hi dude, this looks really interesting, can it handle separated zones and off mesh links? could you post an example with more than just one walkable zone?
     
  5. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Hey Mario! Currently NavMesh2D does not support links between navmeshes (though you can have seperate islands). Last night we came across an issue where we needed off-mesh links as well. In the development build of NavMesh2D we've got off-mesh links working, see the attached image! Once it is polished up and bug free, we will submit an update to the asset store. Just to clarify this feature does not come with the current version of NavMesh2D on the asset store. We'll let you know when the update containing this feature has gone through. :)

    $offmeshlink.png
    Click to enlarge

    Links, links everywhere!
     
    Last edited: Mar 5, 2014
  6. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Now we support off mesh links! :) It is live on the asset store!

     
  7. Burletech

    Burletech

    Joined:
    Jul 1, 2010
    Posts:
    73
    So far I'm enjoying this plug in and it works well. I setup a couple enemies to chase my player. After pushing play I realized there was no agent avoidance. Did I miss that somewhere? I assumed this had it but that may have been an oversight on my part.

    Thanks!

    -Edit-

    Never mind. I see that there is on dynamic avoidance so I assume that means no agent avoidance either. Bummer cause this is a great asset but I don't really see the point with no agent avoidance.
     
    Last edited: Mar 22, 2014
  8. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Hey Burletech. Sorry about that. Dynamic obstacle avoidance is low on the priority list right now, we're working on run-time mesh generation at the moment. There is still plenty of uses for NavMesh2D even without dynamic obstacle avoidance!
     
  9. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Version 1.5.1 is live on the asset store! This update was all about bug fixes, supercharging the performance and getting the code ready for prefab-able NavMesh'es. (more than one navmesh per scene, this is not yet implemented)

    Change log

    - No longer throws an error when a grid point overlaps a collider contour.
    - Massive speed improvements to mesh generation
    - Fixed scene crashed on scene load when the scene had an extremely complex navmesh (10k+ nodes)
    - The above fixed involved merging the WIP Node Networks tool into NavMesh2D
    - NavMesh2D Behaviour is now visible in scene hierarchy to prevent make clean up easier
    - NavMesh2D Behaviour has a custom inspector that shows its properties
    - Spelling errors fixed
    - Changed menu item from NavMesh3D to NavMesh2D
    - Gizmo/icon for Off-Mesh links
     
  10. nmad

    nmad

    Joined:
    Jul 28, 2013
    Posts:
    8
    Hi. Do you currently do path calculation on background or in the main thread?
    It would it be a nice to have with large maps where maybe you need a lot of calculation ...
     
  11. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Hey nmad! Currently we do it on the main thread. We have some basic support for multithreaded path finding on our developer version of Navmesh. The way it works is each seperate island of the Navmesh (connected by Off Mesh Links) gets calculated in its own thread. So you could optimize your path finding by breaking your level up into smaller chunks and connecting the chunks together with off mesh links. This feature isn't released yet, I am still poking around the idea. Just thought I'd mention it to let you know where we will be heading eventually. Right now the focus is on having more than one Navmesh per scene + runtime Navmesh generation!
     
  12. Yoko_

    Yoko_

    Joined:
    Apr 17, 2014
    Posts:
    11
    Hi Pigeon! I really am waiting for the agent avoidance feature, when will I be able to see this release?
     
  13. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Hey Yoko, it is still a long ways out. We are focusing on other features right now, it is pretty slow going due to the complex nature of the asset. Sorry about this! I would say don't rely on us bringing out collision avoidance in the near future when you make your purchase. We definitely want to, but there is so much else to focus on right now.

    edit: @yoko I was going to PM you but you have not turned on private messages for your forum account.
     
    Last edited: Apr 18, 2014
  14. Yoko_

    Yoko_

    Joined:
    Apr 17, 2014
    Posts:
    11
    It's ok, I just wanted to make sure you will do it someday. I am waiting for it but it's not that important for me right now ^^
    (My bad I totally forgot to turn it on, I'm doing it, next time can use MP then)
     
  15. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I am watching this asset very closely , I think it has potential to be very good nav 2d solution. Currently, there isn't one dedicated to 2D, or let alone that works well without any modification to the code base. But I just wonder why does runtime nav mesh generation is higher priority over avoidance feature... I personally think it should be otherway around..

    Because, I don't know how fast the runtime generation would be , but I don't expect it to be like.. quick enough to use it to replace avoidance feature. it usually gets to be used on very special circumstances where the walkable area has to change , etc.. But avoidance feature is most likely be used by a lot more games.

    Even Unity brought in their runtime generation stuff a lot later... I personally think the order of priority should be :

    1. Good 2D nave mesh generator (which it looks like it already does)
    2. Easy to use API to calculate path (which it looks like it already does)
    3. Easy to use nav agent like component so people can start using it straight off
    4. Other features like avoidance , repath , cost of path , smooth path..
    5. Realtime nav gen?

    and I am talking about all above based on good performance , especially for mobile because most likely 2D would be used more so on mobile platform. (therefore, I know you guys are busy.. but a video showing how fast the path calculation is by throwing 100s of "agents" with some testing hardward info and FPS would help new customers to fall down with awe and decide to purchase this product :D )



    It's just my humble opinion and I would also very much like to use this if it has nav agent component and avoidance at least.

    cheers.
     
    Last edited: May 3, 2014
  16. Chucklenauts

    Chucklenauts

    Joined:
    Jun 28, 2013
    Posts:
    3
    The videos show support for walkable box colliders and obstructions made from box, circle, and mesh/polygon colliders. Do you support walkable polygon colliders?
     
  17. Pigeon Coop

    Pigeon Coop

    Joined:
    Jan 17, 2014
    Posts:
    186
    Sorry for the late replies everyone!

    @Chuck

    Yes you can create walkable polygon colliders. All Unity built in 2d colliders (except for edge/segment colliders) can be used as both 'walkable' and 'obstructions'.

    @castor76

    Hey Castor!

    You make some valid points here. We use NavMesh2D in-house on our own projects. As much as we'd love to solely focus on development of our tools (I, the lead programmer, love working on tools!) we've got games to make! :) Our current game did not require dynamic obstacle avoidance and this is why it was left out! I do agree it is an important feature but at the same time you can still get a lot done without it! So unfortunately, its current state, (lacking dynamic avoidance), NavMesh2D wont be right for everyone.

    Another point I wanted to touch up on was runtime navmesh generation. Generating navmesh at runtime is an edge case, you are right. You won't find many situations where you need to do that. But on our way to achieving this goal, there is some other milestones we will be hitting that excite is a lot more. For example, we'll be making it so that NavMesh data is separate from the scene. So you can literally create prefabs out of your navmeshes and instantiate them into the scene at runtime. (infact, runtime mesh generation isn't a big hurdle, separating navmesh data from the scene is the big hurdle!). Once we achieve this, you'll be able to create and bake 'segments' of your level and store them as prefabs for later. Each segment would have its own navmesh. Imagine a dungeon game - You'd define 20 or 30 different 'room' prefabs for your dungeon game and join the rooms randomly together to create an endless runner dungeon game complete with navmesh support (each room would have its own navmesh that is instantiated along with the room itself).

    Also sorry for the late reply you 2!
     
  18. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    This sounds good. Any idea when this will be ready?
     
  19. davidsvson

    davidsvson

    Joined:
    Jul 4, 2014
    Posts:
    11
    Bought the asset yesterday and have just started playing with it, it's great!

    Runtime navmesh generation would really be a huge improvement for me. Any updates on that?
     
    Last edited: Oct 27, 2014
  20. DracoTempus

    DracoTempus

    Joined:
    Mar 21, 2013
    Posts:
    5
    I love this. Is this where I would get support though? I just wanted to know the best way to implement ai to chase something around the map.
     
  21. grogshotgames

    grogshotgames

    Joined:
    Aug 6, 2015
    Posts:
    77
    Hi Pigeon! Why did you stop selling this asset? it looked exactly what I was looking for :(
     
  22. Winocur

    Winocur

    Joined:
    Apr 26, 2013
    Posts:
    10
    Same here. Any chance you can put it back up???
     
  23. BytesCrafter

    BytesCrafter

    Joined:
    Apr 16, 2016
    Posts:
    8
    Where can I find this tool. It is now not available on the assetstore.
     
  24. Undertaker-Infinity

    Undertaker-Infinity

    Joined:
    May 2, 2014
    Posts:
    112
    Ah! I need this but it was deprecated and unavailable for purchase
     
    darklisper likes this.
  25. Android272

    Android272

    Joined:
    Oct 14, 2016
    Posts:
    25
    Why is this no longer on the market? Is Unity in the process of purchasing this or something? That is the only thing that makes sense to me. This looks like it is a great pathfinding system.