API

Function shapeProximity

  • Find the closest point between a query shape and the nearest body in the world.

    The query shape is positioned at position/rotation and tested against the world's broadphase. When a body is found within maxDistance, inputHitPoint is the closest point on the query shape and hitPoint is the closest point on the hit body (world space). Run at least one physics step first so the broadphase exists.

    Parameters

    Returns ShapeProximityResult

    The proximity result; hasHit is false when nothing is within range.