2D Gaming - How to reflect a ball off the bat?
- by sid
Hi there
I am pretty new to XNA & game dev and am stuck at ball reflection. My ball is reflecting once it hits the bat, but only in one angle, no matter which angle the bat is at.
Here's the code:
if (BallRect.Intersects(BatRect))
{
Vector2 NormBallVelocity = Ball.velocity;
NormBallVelocity.Normalize();
…