Sphere - sphere collision detection -> reaction
I need to make an algorithm that detects when two spheres collide, and, the direction that wich one will take an instant after the collision. Let say, Imagine like when you open your table in a pool match, all the balls are colliding one to another "randomly". So, before starting to write the code myself, I was thinking if there is already a implementation of this out there. Thx in advance! Cyas.- You can find a good tutorial here: Link The collision part is easy. Check if the distance between the spheres centers is less than the sum of their radius. As for the bounce, you need to swap the