OneWayConfig
Defined in: physics/src/types.ts:229
Configuration for a one-way platform collider.
Properties
Section titled “Properties”direction?
Section titled “direction?”
optionaldirection?:Vec2Like
Defined in: physics/src/types.ts:237
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:243
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.
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/physics.md.