Physics · function

colliderFromShape

Wrap a world-space shape in the bounds the broad phase needs.

Explained in Your first game, Rigid bodies.

function colliderFromShape(shape: ConvexShape): Collider
import { colliderFromShape } from '@driftengine/physics';

Parameters

ParameterTypeDescription
shapeConvexShape