Interface

BodyCompOpt

:

Options for the body component.

group Component Types

drag

?: number

How much velocity decays (velocity *= (1 - drag) every frame).

since v3001.0

jumpForce

?: number

Initial speed in pixels per second for jump().

maxVelocity

?: number

Maximum velocity when falling.

gravityScale

?: number

Gravity multiplier.

isStatic

?: boolean

If object is static, it won't move, all non static objects won't move past it, and all calls to addForce(), applyImpulse(), or jump() on this body will do absolutely nothing.

since v3000.0

stickToPlatform

?: boolean

If object should move with moving platform (default true).

since v3000.0

mass

?: number

Mass of the body, decides how much a non-static body should move when resolves with another non-static body. (default 1).

since v3000.0

kaplay logo

Layer

Miscalenous