Jump to content
  • Advertisement
Sign in to follow this  

Collision avoidance with path corrections

This topic is 2387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In normal A* pathfinding with collision avoidance, how do you keep each agent's motion as natural as possible?
For instance, if 2 agents are going to face-to-face collide with each other, the avoidance solver will move each agent slightly left or right with respect to each other. However, when this action is complete, the objects will have to go back to their original routes.
In my current implementation, the 2 agents seem to be sliding across each other because of the set path by A*
Is there a open source project available that can perform so well as Clearpath?
Do I need A* if i have collision avoidance already (Goal attracting force enforced)

Share this post

Link to post
Share on other sites
It depends whether you want the avoidance to look like two strangers happening to avoid each other, or a coordinated action where they stay out of each others way.

For the former, what you have might work. Or perhaps each agent has a small influence map around them so A* can re-calculate to avoid the other agent. Different behaviours could be achieved by shaping the influence map, e.g. is it a circle? An arrow pointing the direction they're travelling? Is it stronger on one side so agents tend to walk on the left or right side of a path?

Another possibility is A* with time slices. I'm not an expert on this one, but basically you "reserve" a square for the time you believe you'll be passing through. Others' paths will avoid using the square at the same time. This may look more coordinated, like military units co-operating.

I think A* is still necessary unless you have a very simple map, e.g. outer space. The classic example is a wall shaped like a letter C. A* can find a way around. Simpler path finding approaches may struggle.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!