API

Interface ShapeProximityResult

Result of a shapeProximity query.

interface ShapeProximityResult {
    distance: number;
    hasHit: boolean;
    hitNormal: Vec3;
    hitPoint: Vec3;
    inputHitNormal: Vec3;
    inputHitPoint: Vec3;
}
Index
distance: number

Distance between the closest points.

hasHit: boolean

Whether a body was found within maxDistance.

hitNormal: Vec3

Surface normal at the hit-body closest point.

hitPoint: Vec3

Closest point on the hit body (world space).

inputHitNormal: Vec3

Surface normal at the query-shape closest point.

inputHitPoint: Vec3

Closest point on the query shape (query-shape local space in a zero-offset world).