+ 2
How would i find collision between circles?
In my newest code I made two balls bounce around the canvas while displaying their x and y value on the screen along with their x and y velocity values. I cannot figure out how to see if they collided or not. I established the x and y variables as ballX, ballY, squareX, and square Y. I tried if(ballX==squareX && ballY == squareY) { alert("collision detected"); } but it wont work
2 Answers
+ 2
Good question đ”đŽâȘ đ„đ„đ„
0
Why are you checking only equality?