A posed body's colliders as signed distances: how far a point, or a
segment (a capsule weapon's axis), lies outside the body's profile shapes
(negative inside), and on which segment.
Each profile segment's shapes are placed by its bone: the segment's neutral
frame is its rest frame, and the canonical rig rests unrotated, so a
segment's posed frame is the bone's world transform applied to the
segment's neutral offset from the bone's rest joint. Every shape distance
is the engine's single owner, physicalShapeSegmentDistance, and the
body's distance is the least over its shapes, the distance to their union.
A shape whose bounding sphere already lies farther than the least distance
found is passed over without the exact query, which cannot change the
least, so the searches that call this in loops pay for the near shapes only.
A posed body's colliders as signed distances: how far a point, or a segment (a capsule weapon's axis), lies outside the body's profile shapes (negative inside), and on which segment.
Each profile segment's shapes are placed by its bone: the segment's neutral frame is its rest frame, and the canonical rig rests unrotated, so a segment's posed frame is the bone's world transform applied to the segment's neutral offset from the bone's rest joint. Every shape distance is the engine's single owner,
physicalShapeSegmentDistance, and the body's distance is the least over its shapes, the distance to their union. A shape whose bounding sphere already lies farther than the least distance found is passed over without the exact query, which cannot change the least, so the searches that call this in loops pay for the near shapes only.