Jump to content
  • Advertisement
Sign in to follow this  
anupgupta

Forward Collision Detection

This topic is 2855 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 there

I am currently working on 2D Game for Iphone...
currently the objects move in one Direction along a dedicated path on x-axis or y axis...

I would like to know a method for finding out, based on an object's velocity / position whether an object will collide forward in time with another object.

the objects have varying speeds so the objects in the same line could collide

[Edited by - anupgupta on September 27, 2010 7:33:29 AM]

Share this post


Link to post
Share on other sites
Advertisement
It's actually pretty easy if the objects are moving in a straight line. Just solve the system to determine where the two paths(lines) meet, calculate how long it would take each object to get to this point at there respective velocities and if the amount of time is the same, they will collide. You'll also need to add some sort of tolerance in there to adjust for the different sizes of objects too. Getting it pixel-perfect though may pose a challenge though.

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!