ncollide3d::query

Function distance

Source
pub fn distance<N: RealField + Copy>(
    m1: &Isometry<N>,
    g1: &dyn Shape<N>,
    m2: &Isometry<N>,
    g2: &dyn Shape<N>,
) -> N
Expand description

Computes the minimum distance separating two shapes.

Returns 0.0 if the objects are touching or penetrating.