Physics · interface

ConvexPart

One convex piece of the decomposition, ready for hullShape.

Explained in Your first game, Rigid bodies.

interface ConvexPart
import type { ConvexPart } from '@driftengine/physics';

Properties

NameTypeDescription
pointsreadonlyFloat32Arrayxyz-packed, at most SUPPORT_DIRECTIONS points, in the source mesh's own space.
volumereadonlynumberThe hull's volume, exactly, by the tetrahedral decomposition mass.ts already computes.
fillreadonlynumberCells this part was grown from, as a fraction of its own hull volume.