struct

FAIStimulus

FAIStimulusBus — everything the AI can sense, filed by where it is.

Module
AINavigation
Header
#include "AINavigation/AIStimulusBus.h"
Namespace
Mowo

Gameplay emits stimuli (a sound, a flare seen, a scan pulse, a hit) with a position, a strength and a type; perceivers ask the bus for what lies around them instead of walking every actor and every event in the world. Both halves are indexed by the same 8 m sector key the point-cloud renderer chunks by (FPointCloudSector) — one spatial hash for the scan the players see and the stimuli the creatures sense, so a later change to the chunk size moves both together or neither.

Events live in a fixed ring with a timestamp and a lifetime, and every event has a rising id. A perceiver remembers the last id it consumed, so one that only ticks every fourth frame (significance stagger) still hears the gunshot that happened between its ticks, and none hears the same one twice. When the ring is full the oldest event is overwritten and counted.

Presence — where the perceivable targets are this frame — is rebuilt by the perception system each tick and queried the same way for sight and touch.

Properties

TypeNameDescription
uint32_tidDefault 0.
EAIStimulusTypetypeDefault EAIStimulusType::Sound.
Vec3positionDefault Vec3(0.0f, 0.0f, 0.0f).
floatstrengthDefault 1.0f.
floatradiusDefault 0.0f.
EntityIDinstigatorDefault INVALID_ENTITY.
EntityIDvictimDefault INVALID_ENTITY.
int32_troomIndexThe acoustic room it happened in, -1 outside every room or unknown. Default -1.
floattimeDefault 0.0f.
floatlifetimeDefault 0.0f.
boolflashA Sight stimulus that is a scanner's flash, so a creature that turns toward it knows it saw a scan rather than a flare. Default false.

Public functions

ReturnsNameDescription
floatReachForHow far this stimulus reaches a perceiver whose own sense radius is senseRadius.

Function details

ReachFor

C++
float ReachFor(float senseRadius) const

How far this stimulus reaches a perceiver whose own sense radius is senseRadius.

Generated from AINavigation/AIStimulusBus.h via ainavigation.json · Oct 27, 2026Version 1.0.0