Search Unity

A* Pathfind or Unity's native navigation system?

Discussion in 'Navigation' started by ptr0x, Apr 3, 2015.

  1. ptr0x

    ptr0x

    Joined:
    Dec 9, 2013
    Posts:
    54
    Hello there,

    Does anyone knows about the A* Pathfinding system? Is it really better than the Unity's default? Worth the price ($ 100)?

    If someone knows about any other nice pathfinding system, please let me know.

    Thanks.
     
  2. proandrius

    proandrius

    Unity Technologies

    Joined:
    Dec 4, 2012
    Posts:
    544
    It really depends of what kind of solution you are looking for. I think in some cases Unity NavMesh is good and in some cases A* Pathfinding system is better.
     
  3. ptr0x

    ptr0x

    Joined:
    Dec 9, 2013
    Posts:
    54
    Hi proandrius thanks for you answer. Could you tell me which are the cases whose the Unity NavMesh is better than the A*?

    In my case I need some characters to be moving around the map constantly (the path find alghoritm will be used extensively). Which one should I use?

    Thanks
     
  4. proandrius

    proandrius

    Unity Technologies

    Joined:
    Dec 4, 2012
    Posts:
    544
    You should try using NavMesh. I don't use NavMesh only when I need Pathfinding created at runtime or navigation on moving objects, which you can't do with NavMesh.
     
  5. vee41

    vee41

    Joined:
    Nov 14, 2013
    Posts:
    32
    There is also a free version of A* Pathfinding system available through authors site. Free version can do most of the stuff PRO does.
     
  6. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    A* is a lot more flexible with what it allows you to do. You can place a mesh manually, instead of having it generated, which is an immense boon in some use cases. You get the source, so you can rewrite things until they're a better fit for your game.

    If you just want stuff to move in a generated navmesh, there's no need to do A*. If you have more specialized needs, I'd at least give the free version a go.

    My biggest gripe with built-in pathfinding is that you can't feed it a custom mesh that plays nicely with your abstract geometry. It has to make guesses based on renderers, which is ideal in games based on realistic geometry, but not in games with a simple, flat geometry. I've put a ton of effort into automatically creating a mesh that fits where I want the navmesh to go, marking it as navmesh static, creating the navmesh, and then deleting it. If I had known about A*, I would have saved a ton of work.