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

2D Path finding?

Discussion in 'Getting Started' started by TheNumber12, Aug 12, 2015.

  1. TheNumber12

    TheNumber12

    Joined:
    Jul 28, 2015
    Posts:
    2
    I am not sure if this is the right place to ask this. Anyway is there an easy way to do AI path finding in 2D mode? Is there something like the NavMesh + navigation that is in 3D mode? If not is it possible to flip the NavMesh so that it works on the same axis as 2D mode?
     
  2. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    813
    A* is generally the best way of doing pathfinding. If you're up to it you could program your own A* implementation based on this tutorial (that's what I would do) http://www.newarteest.com/flash/astar.html

    Otherwise, you could try the existing A* Pathfinding Project: http://arongranberg.com/astar/download

    here are examples using that in a 2D game:
    http://hobblygobbly.tumblr.com/post/93960257057/how-to-setup-the-a-pathfinding-project-in-a-2d

    http://www.rocket5studios.com/tutor...-tools-beginning-enemy-ai-with-a-pathfinding/