Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTrienco

Posted 07 October 2012 - 10:04 PM

Sounds like a good time to read up on _collision_ detection, which is a lot more interesting than _intersection_ detection. Just moving the ball and checking for intersection with a rectangle is going to fail anyway if your ball is moving too fast.

It also depends on whether you want to treat your ball as a point (for simplicity) or an actual sphere (requiring special handling for the corners) or if you don't need perfectly precise collisions anyway.

Of course, it could also be a good time to grab some simple 2D physics engine, if you just want it working without diving into the math behind it.

#1Trienco

Posted 07 October 2012 - 10:03 PM

Sounds like a good time to read up on _collision_ detection, which is a lot more interesting than _intersection_ detection. Just moving the ball and checking for intersection with a rectangle is going to fail anyway if your ball is moving too fast.

It also depends on whether you want to treat your ball as a point (for simplicity) or an actual sphere (requiring special handling for the corners) or if you don't need perfectly precise collisions anyway.

PARTNERS