Sign in to follow this  

Forward Collision Detection

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

This topic is 2636 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this