BodyOpts
Defined in: packages/threeplay/src/plugins/physics/types.ts:62
Options of body().
Properties
Section titled “Properties”angularDamping?
Section titled “angularDamping?”
optionalangularDamping?:number
Defined in: packages/threeplay/src/plugins/physics/types.ts:74
Angular damping (default 0.05).
optionalccd?:boolean
Defined in: packages/threeplay/src/plugins/physics/types.ts:78
Continuous collision detection for fast objects (default false).
damping?
Section titled “damping?”
optionaldamping?:number
Defined in: packages/threeplay/src/plugins/physics/types.ts:72
Linear damping (air drag, default 0).
gravityScale?
Section titled “gravityScale?”
optionalgravityScale?:number
Defined in: packages/threeplay/src/plugins/physics/types.ts:70
Multiplies gravity for this body (default 1).
interpolate?
Section titled “interpolate?”
optionalinterpolate?: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.
isStatic?
Section titled “isStatic?”
optionalisStatic?:boolean
Defined in: packages/threeplay/src/plugins/physics/types.ts:64
Never moves (floors, walls).
kinematic?
Section titled “kinematic?”
optionalkinematic?:boolean
Defined in: packages/threeplay/src/plugins/physics/types.ts:66
Moved only by code (pos/move), pushes dynamic bodies.
lockRotation?
Section titled “lockRotation?”
optionallockRotation?:boolean
Defined in: packages/threeplay/src/plugins/physics/types.ts:76
Prevent rotation (default false). Handy for player-like boxes.
optionalmass?:number
Defined in: packages/threeplay/src/plugins/physics/types.ts:68
Mass in kg (default derived from collider volume).