I\'m making pong, and am finding it really difficult to write an algorithm that bounces the ball off the four walls properly (I will deal with scoring later on, because only par
A word of wisdom about using jbx's gradient method. If the ball hits near the corners of the box, while dx will be inverted, dy can place the ball above the top boundary.