Skip to content

BodyOpts

Defined in: packages/threeplay/src/plugins/physics/types.ts:62

Options of body().

optional angularDamping?: number

Defined in: packages/threeplay/src/plugins/physics/types.ts:74

Angular damping (default 0.05).


optional ccd?: boolean

Defined in: packages/threeplay/src/plugins/physics/types.ts:78

Continuous collision detection for fast objects (default false).


optional damping?: number

Defined in: packages/threeplay/src/plugins/physics/types.ts:72

Linear damping (air drag, default 0).


optional gravityScale?: number

Defined in: packages/threeplay/src/plugins/physics/types.ts:70

Multiplies gravity for this body (default 1).


optional interpolate?: boolean

Defined in: packages/threeplay/src/plugins/physics/types.ts:85

Dynamic bodies only: render the pose interpolated between the last two fixed steps (default true). Without it motion looks jittery whenever the display rate is not a multiple of the 50 Hz physics rate. Set false to make pos/rot always hold the latest simulated pose, at the cost of that jitter.


optional isStatic?: boolean

Defined in: packages/threeplay/src/plugins/physics/types.ts:64

Never moves (floors, walls).


optional kinematic?: boolean

Defined in: packages/threeplay/src/plugins/physics/types.ts:66

Moved only by code (pos/move), pushes dynamic bodies.


optional lockRotation?: boolean

Defined in: packages/threeplay/src/plugins/physics/types.ts:76

Prevent rotation (default false). Handy for player-like boxes.


optional mass?: number

Defined in: packages/threeplay/src/plugins/physics/types.ts:68

Mass in kg (default derived from collider volume).