newton.geometry.collide_sphere_sphere#

newton.geometry.collide_sphere_sphere(pos1, radius1, pos2, radius2)[source]#

Sphere-sphere collision calculation.

Parameters:
  • pos1 (vec3f) – Center position of the first sphere

  • radius1 (float) – Radius of the first sphere

  • pos2 (vec3f) – Center position of the second sphere

  • radius2 (float) – Radius of the second sphere

Returns:

dist: Distance between sphere surfaces (negative if overlapping) pos: Contact position n: Contact normal vector

Return type:

Tuple containing