Skip to content

senseTarget

senseTarget(ox, oy, facing, tx, ty, range, halfFov, isBlocked?): SenseResult

Defined in: ai/perception/sense.ts:43

Sense target from observer. halfFov is half the field-of-view in radians (≥ π means omnidirectional). isBlocked(ox,oy,tx,ty) returns true when the line of sight is occluded. An observer standing on the target is visible.

number

number

number

number

number

number

number

(ox, oy, tx, ty) => boolean

SenseResult