Skip to content

1681-engine / index / ContactInfo

Interface: ContactInfo ​

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

A contact as events and queries report it. The normal points from a towards b; y grows downwards.

Properties ​

a ​

ts
readonly a: Body;

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


b ​

ts
readonly b: Body;

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


depth ​

ts
readonly depth: number;

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

Overlap along the normal, px (slightly negative while resting just apart).


nx ​

ts
readonly nx: number;

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


ny ​

ts
readonly ny: number;

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


points ​

ts
readonly points: readonly Vec2[];

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

Where the two touch, world px: one or two points (two where an edge lies along an edge).


sensor ​

ts
readonly sensor: boolean;

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

Either body is a sensor: reported, never resolved.

Released under the MIT License.