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:
dist: Distance between surfaces (negative if overlapping) pos: Contact position (midpoint between closest surface points) normal: Contact normal vector (from first capsule toward second)
- Return type:
Tuple containing