@modoki/engine / index / getContactState
Function: getContactState()
getContactState(
world,entityId): {contacts:number[];overlaps:number[]; } |undefined
The body's CURRENT contacts + overlaps as sorted entity-id arrays, or undefined when it is touching nothing. Sorted so the output is stable across runs (determinism). The scene-state fold resolves these ids to GUIDs.
Parameters
world
World
entityId
number
Returns
Type Literal
{ contacts: number[]; overlaps: number[]; }
Physics
contacts
contacts:
number[]
overlaps
overlaps:
number[]
undefined