I'm trying to make Breakout, and I'm trying to make the ball bounce off the paddle at different angles based on where it hits the paddle. Can anyone tell me if there's a method for this and how to use it?
double factor=(ball.getX()-paddle.getX())/((ball.getImage().getWidth()+paddle.getImage().getWidth())/2);