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.
Parameters
Section titled “Parameters”observer
Section titled “observer”facing
Section titled “facing”target
Section titled “target”number
halfFov
Section titled “halfFov”number
isBlocked?
Section titled “isBlocked?”(from, to) => boolean