The scenario as you can see in the picture. A ball will be hitting a surface and I want to fairly correctly get the new angle after the collision..

I expect to know the X,Y coordinates of the lines breaking points (The picture below would has 6 lines)

Secondly, if the ball would have a rotation - Is there a standard way of compensate for a "screewed" ball?

alt text


1 Answer 1


What you need to calculate is the reflection vector;

if v is the velocity of your ball and n is the normal vector of the surface the ball is bouncing from then the the velocty of the ball after the bounce (assuming perfectly elastic collision etc) will be;


in 2d this will be;



  • 1
    \$\begingroup\$ Good general purpose answer. Just a little note for those making more simplistic rebound game like breakout or pong or the like, if you have a axis aligned bounding box and are not doing real physics (you want the velocity to remain the same) then you can just swap the components of the velocity vector. ie: If you reach the left or right edge of the box, negate the X value of the velocity vector. If you reach the top or bottom, negate the Y value of the velocity. \$\endgroup\$
    – James
    Jan 11, 2011 at 23:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .