## 2D deflection

First I check to see if they intersect (r1+r2 > distance_between), but I cant seem to wrap my head around how to deflect them with each other. They are hitting each other at some angle, which I could get from the slope of the line between them, no problem, but could someone write some psuedo-code for this kind of deflection, I cant seem to get it. Thanks in advance, Will.

First back up the spheres until they are non-intersecting or close to. Then draw a line between the centers. Dot with each sphere's velocity vector to find the force component you need to sum and reflect. Update your velocity vectors and the move by the time you backed up.

I did all this math a long time ago but I don't have any code to show for it. Sorry. There are simpler/faster/less accurate ways of doing things, so don't take my word for it.

I did all this math a long time ago but I don't have any code to show for it. Sorry. There are simpler/faster/less accurate ways of doing things, so don't take my word for it.

---Kelvin--

15.4" MacBook Pro revA

1.83GHz/2GB/250GB