Skip to content

Result Manifold

selimanac edited this page Dec 19, 2024 · 1 revision

Manifold contains detailed information on how AABBs or rays collide with each other.

  • Manifold generation is a relatively expensive process.
  • This library does not support sweep-based continuous collision detection (CCD) and does not prevent tunneling. You may handle this situation using raycast.
  • If the center of a colliding AABB passes the center of the collided AABB, the offset will be on the opposite side of the collided AABB."

Parameters

  • id - AABB ID
  • contact_point_x and contact_point_y - Contact point positions
  • normal_x and normal_y - Contact point normal
  • depth - Depth of the collision. This is only available for AABB queries. The raycast result is always 0.
  • distance - Distance between the centers of two AABBs. Raycast distance is measured from the ray's start point.
{ 
  id = 5,
  contact_point_x = 20,
  contact_point_y = -9.5,
  normal_x = 1,
  normal_y = 0,
  depth = 1.2,
  distance = 41.112651824951
}
Clone this wiki locally