Jump to content
  • Advertisement
Sign in to follow this  
cmwslw

Collision detection

This topic is 4093 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
Advertisement
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
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!