🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Collision avoidance with path corrections

Started by
0 comments, last by jefferytitan 12 years, 4 months ago
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)
Thanks
Jack
Advertisement
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.

This topic is closed to new replies.

Advertisement