Skip to content

senseTarget

senseTarget(observer, facing, target, range, halfFov, isBlocked?): SenseResult

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

Sense target from observer, which faces along facing (need not be unit). halfFov is half the field-of-view in radians (≥ π means omnidirectional). isBlocked(from, to) returns true when the line of sight is occluded. An observer standing on the target is visible.

Vec3

Vec3

Vec3

number

number

(from, to) => boolean

SenseResult