When the ball collides with the "face" of the paddle it reflects back at an angle. Where I'm falling short is exactly how to determine the reflection angle. I've looked over SixOfEleven's breakout tutorial, and he suggested using line segment math, but I really don't understand it.(I am currently researching it and will update this thread if/when I come up with an attempt).

I have implemented a piece where I split the paddle into the top and bottom half, then based off where in each segment the ball hits, I change the Y of motion to 60 degrees * the percent "sector" of the paddle. I did this based off reading this thread: Pong Collision Help in C#

int degree = -60; if (motion.Y > 0) { degree = 60; } if (ballLocation.Y < player.paddle.GetBounds().Height / 2) { float percent = ballLocation.Y / ((float)(player.paddle.GetBounds().Height) / 2); motion.Y = degree * (percent / 100); } else { float percent = ballLocation.Y / (float)player.paddle.GetBounds().Height; motion.Y = degree * (percent / 100); }

While this does work somewhat, it is very sporadic and the angles just don't seem like they are "real". Depending on where the ball hits the speed will be either extremely slow, or extremely fast.

I've looked through google using this search, but have not been able to figure out a good way to do paddle collision. My questions is this, beyond doing the basic .Intersects(), what would be the most efficient way of doing the collision.

Here is the full PaddleCollision method:

public void PaddleCollision(Player player) { Rectangle ballLocation = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height); if (player.paddle.GetBounds().Intersects(ballLocation)) { if (player.playerNumber == 1) { position.X = player.paddle.GetBounds().X + texture.Width; } else { position.X = player.paddle.GetBounds().X - texture.Width; } int degree = -60; if (motion.Y > 0) { degree = 60; } if (ballLocation.Y < player.paddle.GetBounds().Height / 2) { float percent = ballLocation.Y / ((float)(player.paddle.GetBounds().Height) / 2); motion.Y = degree * (percent / 100); } else { float percent = ballLocation.Y / (float)player.paddle.GetBounds().Height; motion.Y = degree * (percent / 100); } motion.X *= -1; } }