Sign in to follow this  

Collision detection

This topic is 3871 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 am making a physics simulation that has a ball bouncing around the screen with several lines that serve as obstacles. I am using iterative methods for gravity etc., and I want to detect if the ball has collided with a line. What makes this even harder is that the ball is 32x32 with its center being at 16,16. This means that there is a 16 pixel offset in every direction. I'm guessing you would use line and circle collision detection. I'd like to detect the collision as fast as possible. Can anyone point me in the right direction as to what method I should use? -Cory Walker [Edited by - cmwslw on May 7, 2007 7:18:52 PM]

Share this post


Link to post
Share on other sites
Quote:
I'm guessing you would use line and circle collision detection.

Yep.
http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/

Share this post


Link to post
Share on other sites
I have one question though: What does the variable 'u' stand for? It doesn't mention anything about 'u'.
EDIT: Nevermind, I figured it out. You are supposed to solve for u at the end.

Share this post


Link to post
Share on other sites

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