Is there a way to get the normal and depth of two spheres that have collided.
I know that it is something to do with the center and radius of two spheres but I am not sure what
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
This is probably the simplest 3D collision check.
Distance between sphere centers is
length(c1.center - c2.center)
Depth is distance - radius1 - radius2 =
length(c1.center - c2.center) - c1.radius - c2.radius
normalized(c1.center - c2.center) for c2 and the inverse of that for c1.