pub struct OverlapHit {
pub body: Option<RigidBodyHandle>,
pub collider: ColliderHandle,
pub separation: f32,
pub collider_point: [f32; 3],
pub probe_point: [f32; 3],
pub normal: [f32; 3],
}Expand description
Signed point/ball proximity to one convex collider child.
See PhysicsWorld::overlap_sphere_into for a runnable placement recipe.
Witnesses satisfy probe_point - collider_point = normal * separation,
within floating-point rounding, including when the center is inside the
collider. For penetration these are opposing support witnesses, rather than
closest points of the intersecting volumes. At centers/edges where the
nearest exit is not unique the kernel chooses a deterministic outward normal;
it is a valid exit direction, not a uniquely defined surface gradient.
Fields§
§body: Option<RigidBodyHandle>Parent body, matching RayHit; attached children always return Some.
collider: ColliderHandleExact child identity; compound siblings count separately.
separation: f32Positive gap, zero touch, or negative penetration, in world units.
collider_point: [f32; 3]Boundary witness on the target collider in world coordinates.
probe_point: [f32; 3]Boundary witness on the probe (its center for point queries).
normal: [f32; 3]Unit outward target normal, pointing along the probe’s exit direction.
Implementations§
Source§impl OverlapHit
impl OverlapHit
Sourcepub fn penetration_depth(self) -> f32
pub fn penetration_depth(self) -> f32
Distance to translate the probe along normal to touch this child.
Zero for touching or separated results. See the placement recipe on
PhysicsWorld::overlap_sphere_into.
Trait Implementations§
Source§impl Clone for OverlapHit
impl Clone for OverlapHit
Source§fn clone(&self) -> OverlapHit
fn clone(&self) -> OverlapHit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more