Original Post
I have a ball bouncing against a wall defined by points p1 and p2. When the ball hits the wall it should bounce off it realistically. I've already got the code to find the collision and to push it back outside of the shape, I just can't think of how to decide the ball's new velocity vector. I'm thinking it's just going to be a reflection over the normal of the wall, but I can't think of how to do that.