Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Source code for collision avoidance?

This topic is 2559 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

Hello,
Basically, I've my pathfinding code implemented. The problem however is to have multiple objects doing that simultaneously in the scene. Everybody is tunneling through each other. I don't need very fancy techniques, just a simple one with collision avoidance is enough. Could anyone please show me a place for source code I can take a look at? On the other hand, I am interested in other state-of-the-art techniques in use today. Just want to have a look. What other web sites have this kind of info?
Thanks
Jack

Share this post


Link to post
Share on other sites
Advertisement
Well pathfinding is great to find out how to get from point A to point B, however, it does not automatically evaluate moving objects, it can be made to though.

What you need to keep in mind in this case is that the initial path found is the static path, while you are traveling that path you may want to either perform shorter path finds to avoid moving obstacles or check if the next step is free before you advance towards it.
My approach would be a combination of both, do a full path find to find the static path, perform a collision test on close future positions to detect if a new moving obstacle has occupied them and in a positive case, perform a short range pathfind to figure out how to skip that obstacle and return to your originally planned path.


Share this post


Link to post
Share on other sites
Path planning (aka pathfinding) and path execution are separate problems.

Solving the latter generally involves steering behaviours. The Craig Reynolds paper is pretty much the gold standard reference on the subject.

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!