Skip to content

ContactFilter

ContactFilter = (contact) => boolean

Defined in: physics/src/types.ts:358

Decides whether a candidate contact pair is solid for the current physics step. Return true to collide normally, false to let the two colliders pass through each other this step.

Runs inside the physics step for every candidate pair involving the collider, every step — keep it cheap and do not create or destroy entities, bodies, or colliders from inside it. When both colliders in a pair have filters, both run for every candidate pair and the pair is solid only if both return true.

ContactCandidate

boolean

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.