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

Aron Granberg - A* local avoidance for vehicles.

Discussion in 'Scripting' started by YorkshirePudding, Apr 23, 2013.

  1. YorkshirePudding

    YorkshirePudding

    Joined:
    Apr 10, 2013
    Posts:
    18
    Hi,

    I am currently working on an RTS game and need a good navigation system and the A* Pathfinding Project Pro looks just the ticket. I have just one question before I purchase the pro version though. The units in my game would need to avoid each other if a group of units have been ordered to go to the same location. I have seen that you have local avoidance built into this library, however I can't see any information on restricting movement directions, for instance a vehicle cannot move sideways. As an alternative to restricting movement for the local avoidance can you get a vector to the modified position so that I can manually turn the vehicle and head towards that.

    How I plan on using the system is by getting the next path point (smoothed) then rotating my vehicle and moving towards it manually. So if there is a way to get a modified path point/vector from the local avoidance system I can quite easily implement the avoidance system.


    Thank you
     
  2. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    You should do some research into steering behaviors and flow fields. Not sure if Aron's solution includes steering (it would seem odd not to) but it's worth knowing about anyway and fairly simple to get the basic ones implemented yourself.
     
  3. Kinos141

    Kinos141

    Joined:
    Jun 22, 2011
    Posts:
    969
  4. YorkshirePudding

    YorkshirePudding

    Joined:
    Apr 10, 2013
    Posts:
    18
    Hi Guys,

    thanks for the input, it is appreciated. I have experience of implementing steering behaviours and potential field navigations systems in the past so that's not a problem. What I was asking was does Aron's system allow me to implement vehicle behaviours using the built in local avoidance system. I work on my game probably 1-2 hours per week, I have very little spare time so any out-of-the box functionality is gladly welcomed to help me finish in a reasonable amount of time.

    To clarify my original question, I can create my own navigation system for vehicles, however I would prefer to use a pre-packaged system to save time. I would like to be able to use built in functionality if possible to do as much of the navigation work as I can. Ultimately what I would like from the nav system is a series of vectors/path nodes that I can then manually steer my vehicles towards. I would really like to be able to use the local avoidance system to automatically modify the path nodes so they move around each other, or if the local avoidance system provided me with a modification vector that I can manually apply to avoid other agents that would work too. Does Aron's solution allow this? From what I have read the RVO system he uses automatically moves the agents for you but in a way that is only suitable for units that can strafe.