OneWayConfig
Defined in: physics/src/types.ts:189
Configuration for a one-way platform collider.
Properties
Section titled “Properties”direction?
Section titled “direction?”
optionaldirection?:Vec2Like
Defined in: physics/src/types.ts:197
Direction the solid side faces, in the platform body’s local frame.
Any non-zero vector with finite components, normalized internally; a
zero vector throws when the component is constructed. Default:
{ x: 0, y: -1 } — the solid side faces up, so bodies land from above
and pass through from below.
margin?
Section titled “margin?”
optionalmargin?:number
Defined in: physics/src/types.ts:203
How deep (in pixels) a body may already overlap the solid face and still land on it. Below that, the body counts as inside the platform and passes through. Finite. Default: 4.