elastic 2d ball collision using angles
问题 Yes theres a few threads on this, but not many using angles and I'm really trying to figure it out this way, I'm now stuck on setting the new velocity angles for the circles. I have been looking at: http://www.hoomanr.com/Demos/Elastic2/ as a reference to it, but I'm stuck now. Can anybody shed some light? cx/cy/cx2/cy2 = center x/y for balls 1 and 2. vx/vy/vx2/vy2 = velocities for x/y for balls 1 and 2 function checkCollision() { var dx = cx2 - cx; //distance between x var dy = cy2 - cy; //