Collision detection
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]
Quote:I'm guessing you would use line and circle collision detection.
Yep.
http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement