AIPerceptionSystem
- Module
- AINavigation
- Header
#include "AINavigation/AIPerceptionSystem.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
SystemPhase | GetPhase | |
bool | DeclaresComponentAccess | The BehaviorTreeComponent write is the blackboard publish on sight/hearing updates — without it in the mask this races BehaviorTreeSystem if both ever declare. |
ComponentMask | GetReadMask | |
ComponentMask | GetWriteMask | |
uint32_t | GetResourceReadMask | Sight raycasts the physics world. |
void | Update | |
uint32_t | EmitStimulus | Every sense reads the stimulus bus. |
void | ReportNoise | |
void | ReportDamage | |
const FAIStimulusBus& | GetStimulusBus | |
const FAINoiseMap& | GetNoiseMap | Every sound and scan filed here also lands on the noise map, spread by the world's sound propagation (ai.NoiseMap.*). |
FAINoiseMap& | GetNoiseMap | |
bool | DirectAttention | Points a perceiver that cannot see its target at a place, as if it had heard something there: last known position and stimulus, published to its blackboard on the next update. |
TMulticastDelegate<EntityID, EntityID>& | OnTargetGained | |
TMulticastDelegate<EntityID, EntityID>& | OnTargetLost | |
const AIPerception* | GetPerceptionState | |
const std::vector<FAIPerceivedActor>* | GetKnownActors | Every actor perceiver currently remembers, seen or not; nullptr for an unknown perceiver. |
uint32_t | GetPerceiverUpdateCount | |
void | DebugDrawPerception |
Function details
GetPhase
SystemPhase GetPhase() const overrideDeclaresComponentAccess
bool DeclaresComponentAccess() const overrideThe BehaviorTreeComponent write is the blackboard publish on sight/hearing updates — without it in the mask this races BehaviorTreeSystem if both ever declare.
GetReadMask
ComponentMask GetReadMask() const overrideGetWriteMask
ComponentMask GetWriteMask() const overrideGetResourceReadMask
uint32_t GetResourceReadMask() const overrideSight raycasts the physics world.
Update
void Update(float deltaTime) overrideEmitStimulus
uint32_t EmitStimulus(const FAIStimulus& stimulus)Every sense reads the stimulus bus. These file onto it; the room a stimulus happened in is stamped here, where the world is known.
ReportNoise
void ReportNoise(const Vec3& position, float loudness, EntityID instigator)ReportDamage
void ReportDamage(EntityID victim, EntityID instigator, const Vec3& position)GetStimulusBus
const FAIStimulusBus& GetStimulusBus() constGetNoiseMap
const FAINoiseMap& GetNoiseMap() constEvery sound and scan filed here also lands on the noise map, spread by the world's sound propagation (ai.NoiseMap.*).
GetNoiseMap
FAINoiseMap& GetNoiseMap()DirectAttention
bool DirectAttention(EntityID perceiver, const Vec3& position, const char* reason)Points a perceiver that cannot see its target at a place, as if it had heard something there: last known position and stimulus, published to its blackboard on the next update. False when the perceiver is unknown or is watching its target.
OnTargetGained
TMulticastDelegate<EntityID, EntityID>& OnTargetGained()OnTargetLost
TMulticastDelegate<EntityID, EntityID>& OnTargetLost()GetPerceptionState
const AIPerception* GetPerceptionState(EntityID entity) constGetKnownActors
const std::vector<FAIPerceivedActor>* GetKnownActors(EntityID perceiver) constEvery actor perceiver currently remembers, seen or not; nullptr for an unknown perceiver. Co-op AI tracks each player through this while the component and blackboard carry the one current target.
GetPerceiverUpdateCount
uint32_t GetPerceiverUpdateCount(EntityID entity) constDebugDrawPerception
static void DebugDrawPerception(World* world)