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. Dismiss Notice

Best pathfinding tool for Unity

Discussion in 'Editor & General Support' started by JeppeNygaard, Jul 1, 2012.

  1. JeppeNygaard

    JeppeNygaard

    Joined:
    Dec 7, 2010
    Posts:
    13
    I initially posted this question in answers.unity3d.com, but was told that this should be posted on the forum, so here goes:



    Hi all,

    I'm currently working on a game which will have small squad of 3 hero players which are controlled around a map, much like a traditional RTS. I've been looking around for the best, quickest, most easy-to-use and most flexible pathfinding tool available for unity to control my squad. I've tried Unity's navmesh agents, A* pathfinding and as I search for answers more and more questions arise - can anyone with pathfinding knowledge help me pick the right tool? ... or maybe just share some thoughts on the matter? - I've recently added PlayMaker to the mix, and I'm quite happy with it - so a pathfinding tool that would work/integrate well with PlayMaker would be an ideal match for me.

    I'm really looking forward to hearing from you

    Thanks in advance Jeppe
     
  2. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    697
    I have suggestion, however I am not sure if it is really considered a pathfinding system or if it is what you are looking for. This is what I have been doing for my current project that involves a lot of characters walking around a city:

    I have a bunch of triggers set up all over the place. I'm saying a lot of them lol. If I want the character to walk to a certain trigger, I just have the character move towards the trigger while playing an animation or whatever. When the character hits that trigger, different animations play and also it directs him to the next trigger. When you do this on a large scale, I have characters walking around to set points (triggers), hitting the trigger and playing an animation like sipping coffee or whatever, then after the animation plays they start moving towards the next trigger. It really works well and looks very natural. You could implement this easily with Playmaker, I am assuming this because I use uScript entirely with no programming to accomplish this. Again, this isn't exactly pathfinding, but it does get the object from point A to B to C. Maybe if there is another pathfinding aspect that somebody else could share, you could use the combination to achieve your goal?
     
  3. JeppeNygaard

    JeppeNygaard

    Joined:
    Dec 7, 2010
    Posts:
    13
    Thank you so much for your idears! ... I guess the result would be much like a way-point system which is not really what I'm looking for. The A* system seems to be quite ideal but maybe also slightly over the top and most documentation revolves around c# and i'm looking for a js approach. All I need to do is to select a point on the map which would generate three destinations on the navmesh just around the selected vector and then maybe use unitys own path system, but I cant really get my head around a solution for multible agents (3 to be exact) using unitys own system - any thouhts on that?

    Thanks
    Jeppe
     
  4. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    697
    sorry I haven't checked back in a while lol. I unfortunately do not have any experience with navmesh system, I have been using the strategy above only. Maybe somebody else could chime in here?