Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Procedurally navmesh for a 2d game

Discussion in 'AI & Navigation Previews' started by print_helloworld, Feb 15, 2017.

  1. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    227
    Haven't seen any threads here on how this could be used for 2d games since i was researching before I started on my own navmesh for 2d. So I decided to implement a system where any object in 2d space, can have a link to a 3d navmesh agent on a navmesh surface that matches the game world. All using the new experimental stuff.

    So this
    upload_2017-2-14_22-0-54.png
    Became this, by also procedurally making a mesh.


    And this way, all of my enemies can now walk anywhere, but not cross rooms. And this also lets me add companions that follow the player around!
    This stuff is awesome btw, keep this up. Hope to see some nice stuff out of this.
     
  2. dCalle

    dCalle

    Joined:
    Dec 16, 2013
    Posts:
    55
    looks great, I thought about evading-algorithms when I realized I couldn't just use navmesh hands on. (in space with a lot of room) turns out just having a 2d navmesh would be quite a time and nerve saver (because I use movement on the x/y plane not the x/z... bummer)