Well I've figured out my collision detection problem between two balls(from my previous thread in the maths forum) and now I have to figure out the physics side of the collision.

I know that the force exerted on each ball will be a scalar product of the vector between the centres of the balls. So I know the direction of the force. However, I am uncertain how to calculate the velocities of the balls after the collision, conserving energy and momentum. I have the following equations, derived from the energy and momentum before and after the collision:

m1u1 + m2u2 = m1v1 + m2v2

m1u12 + m2u22 = m1v12 + m2v22

These equations can be solved, giving two sets of solutions for v1 and v2, but they don't take into account the angle that the balls collide at. I need to combine the knowledge of the direction in which the force acts with these equations somehow.

I'm sure someone knows how to do this, I think I must be having some kind of mental block or something. I'll keep at it anyway in the meantime, but I appreciate any kind of help.