Skip to content

five-on-it / packages/sim/src/escape / hookAnchor

Function: hookAnchor() ​

hookAnchor(sim, eid, yaw): { x: number; y: number; z: number; } | undefined

Defined in: packages/sim/src/escape.ts:111

Where the hook catches when its user aims along yaw: the first wall along the aim, at chest height, within reach; the top of that wall (a roof, a ledge) a step beyond its face, high enough to be worth it, flat enough to stand on, with room over it, and the way up to the edge clear. undefined when it catches nothing.

Parameters ​

sim ​

SimWorld

eid ​

number

yaw ​

number

Returns ​

{ x: number; y: number; z: number; } | undefined