Good Afternoon,
I’m working on collision detection between 2 circles, using the distance equation. I have written the functions:
CircleCircle(c1xPos,c2xPos,c1yPos,c2yPos) = √((c1xPos - c2xPos)^2) + ((c1yPos - c2yPos)^2)
OnCollisionCircle = {CircleCircle(c1x, c2x, c1y, c2y) ≤ (c1r + c2r): 1, 0}
OnCollisionCircle returns 1 if the circles are colliding, or 0 if they aren’t. How do I make the two circles collide with one another? Desmos senses when they are colliding, but how do I stop them from intersecting one another?
My project can be found at: Physics Engine (Optimized) | Desmos