Take the 2-minute tour ×

I'm creating a game (Breakout) that involves a paddle and ball. I'm having trouble calculating the direction that I should send the ball after collision with the paddle.

Currently, upon collision I've reversed the Y velocity of the ball so it gets sent upwards, but if, for example, it hits the left side of the paddle and the paddle is moving to the left, how would I know where to send the ball? I'm not sure how to calculate this.

I want the user to have more control over where the ball goes instead of just reversing the Y velocity - this just keeps the ball going in a constant square.

share|improve this question
This is probably more adapted to physics.SE. You should use the conservation laws like conservation of (kinetic) energy and conservation of momentum. Maybe have a look first at Wikipedia. –  Tom-Tom Apr 17 at 12:44

Your Answer



Browse other questions tagged or ask your own question.