Skip to content

1681-engine / index / RayHit

Interface: RayHit ​

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

Properties ​

body ​

ts
body: Body;

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


fraction ​

ts
fraction: number;

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

Share of the ray's length at the hit, 0–1.


nx ​

ts
nx: number;

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

Surface normal there, pointing back towards the ray's start.


ny ​

ts
ny: number;

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


x ​

ts
x: number;

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

Where the ray met the body.


y ​

ts
y: number;

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

Released under the MIT License.