Vector reflect problem
- by xdevel2000
I'm testing some vector reflection and I want to check what happens when
a ball collides with a paddle.
So if I have:
Vector2 velocity = new Vector2(-5, 2);
position_ball += velocity;
if (position_ball.X < 10)
{
Vector2 v = new Vector2(1,0); // or Vector2.UnitX
velocity = Vector2.Reflect(velocity, v);
}
then, correctly,…