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.
Parameters
Section titled “Parameters”number
number
facing
Section titled “facing”number
number
number
number
halfFov
Section titled “halfFov”number
isBlocked?
Section titled “isBlocked?”(ox, oy, tx, ty) => boolean