newton.geometry.collide_capsule_capsule#

newton.geometry.collide_capsule_capsule(cap1_pos, cap1_axis, cap1_radius, cap1_half_length, cap2_pos, cap2_axis, cap2_radius, cap2_half_length)[source]#

Core contact geometry calculation for capsule-capsule collision.

Parameters:
  • cap1_pos (vec3f) – Center position of the first capsule

  • cap1_axis (vec3f) – Axis direction of the first capsule

  • cap1_radius (float) – Radius of the first capsule

  • cap1_half_length (float) – Half length of the first capsule

  • cap2_pos (vec3f) – Center position of the second capsule

  • cap2_axis (vec3f) – Axis direction of the second capsule

  • cap2_radius (float) – Radius of the second capsule

  • cap2_half_length (float) – Half length of the second capsule

Returns:

contact_dist: Vector of contact distances (MAXVAL for invalid contacts) contact_pos: Matrix of contact positions (one per row) contact_normal: Shared contact normal vector (from capsule 1 toward capsule 2)

Return type:

Tuple containing