ContactCandidate
Defined in: physics/src/types.ts:314
A candidate contact pair, seen from one collider’s side, before any
contact exists. Passed to a ContactFilter — no contact normal or
contact point is available at this stage, only positions and velocities.
All values are from the start of the physics step being computed, before this step’s movement is applied — for a body that crossed a surface mid-step, they tell you which side it came from.
The same object instance is reused for every filter call; read what you need inside the filter and do not hold a reference to it.
Properties
Section titled “Properties”
readonlydt:number
Defined in: physics/src/types.ts:324
Duration of the physics step being computed, in seconds.
readonlyother:Entity
Defined in: physics/src/types.ts:316
The other entity in the candidate pair.
otherCollider
Section titled “otherCollider”
readonlyotherCollider:ColliderComponent
Defined in: physics/src/types.ts:318
The other entity’s collider component.
otherRotation
Section titled “otherRotation”
readonlyotherRotation:number
Defined in: physics/src/types.ts:340
Other collider’s world rotation in radians.
otherShapeIndex
Section titled “otherShapeIndex”
readonlyotherShapeIndex:number
Defined in: physics/src/types.ts:322
Index of the other participating shape in its collider component.
otherVelocityX
Section titled “otherVelocityX”
readonlyotherVelocityX:number
Defined in: physics/src/types.ts:342
Other body’s X velocity in pixels/s.
otherVelocityY
Section titled “otherVelocityY”
readonlyotherVelocityY:number
Defined in: physics/src/types.ts:344
Other body’s Y velocity in pixels/s.
otherX
Section titled “otherX”
readonlyotherX:number
Defined in: physics/src/types.ts:336
Other collider’s world X position in pixels.
otherY
Section titled “otherY”
readonlyotherY:number
Defined in: physics/src/types.ts:338
Other collider’s world Y position in pixels.
selfRotation
Section titled “selfRotation”
readonlyselfRotation:number
Defined in: physics/src/types.ts:330
Own collider’s world rotation in radians.
selfShapeIndex
Section titled “selfShapeIndex”
readonlyselfShapeIndex:number
Defined in: physics/src/types.ts:320
Index of this participating shape in its collider component.
selfVelocityX
Section titled “selfVelocityX”
readonlyselfVelocityX:number
Defined in: physics/src/types.ts:332
Own body’s X velocity in pixels/s.
selfVelocityY
Section titled “selfVelocityY”
readonlyselfVelocityY:number
Defined in: physics/src/types.ts:334
Own body’s Y velocity in pixels/s.
readonlyselfX:number
Defined in: physics/src/types.ts:326
Own collider’s world X position in pixels.
readonlyselfY:number
Defined in: physics/src/types.ts:328
Own collider’s world Y position in pixels.
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.