FCBP_SightPerception

AI sight tuning. Passed with .sightPerception(...) inside FCBP_CPAI.

Setters

Setter Effect
enableSight(bool) Master switch: if false, no perception component is created at all (the AI is blind). Default false — you must set it true for sight to work. Also sizes the navmesh agent radius to the sight radius.
sightDistanceMeter(float) Sight radius, in meters. Only Hostile actors are detected.
lossSightDistanceMeter(float) Distance (meters) beyond which a seen target is lost.
viewingAngleDegree(float) Peripheral vision half-angle, in degrees.
forgetAfterSecond(float) Seconds before a lost target is forgotten (stimulus max age).

Example

FCBP_SightPerception sight = FCBP_SightPerception()
    .enableSight(true)
    .sightDistanceMeter(30.0f)
    .lossSightDistanceMeter(50.0f)
    .viewingAngleDegree(66.0f)
    .forgetAfterSecond(5.0f);