pub struct OverlapHit {
pub point: DVec3,
pub normal: DVec3,
pub depth: f64,
pub part: usize,
}Expand description
Where, how deep and which way a query sphere overlaps one collider.
The overlap queries’ answer per collider —
PhysicsWorld::overlap_sphere and
every form of it. Not a ShapeHit: an overlap has no
time of impact, so a ray parameter would be a field with no meaning, and
the depth a sweep cannot give is the measurement an overlap exists for.
Fields§
§point: DVec3The point of the collider’s surface the query sphere is pushed out
from: moved depth along normal, the sphere touches the collider
here.
normal: DVec3Unit direction to move the query sphere along to leave the collider, pointing out of the collider.
depth: f64How far along normal the sphere has to move. Always positive — see
the module docs.
part: usizeWhich part of the collider the sphere is deepest in: for a compound
(crate::PhysicsWorld::add_compound) the index of the part in its
CompoundShape::parts, and 0 for
every other collider and from every shape-level function here.