Sign in to follow this  

2D movements between objects.

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

I'm having trouble understanding how to deal with movings objects that are going at different speeds. Sometimes the speeds of objects are much greater than others, so how do I deal with knowing the exact point of impact between objects especially if they are moving in different angles. This is in 2D.

Share this post


Link to post
Share on other sites
Given two line equations (the support for your objects trajectories, regardless of the actual magnitude of their velocities), you can compute the intersection point. It's a simple system of affine equations. Once you have that point, you can compute the time at which each object reaches it (divide the distance to that point by the object's actual velocity). If the objects reach the intersection at the same time, you have a collision.

If the objects aren't points, the system gets a bit more complicated (you have to compute the actual object-object distance as a function of time and find the minimum), but the basic idea goes along similar lines.

Share this post


Link to post
Share on other sites

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