UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FActorPerceptionInfo Struct Reference

#include <AIPerceptionComponent.h>

Public Member Functions

 FActorPerceptionInfo (AActor *InTarget=nullptr)
 
FVector GetLastStimulusLocation (float *OptionalAge=nullptr) const
 
bool HasAnyKnownStimulus () const
 
bool HasAnyCurrentStimulus () const
 
FVector GetStimulusLocation (const FAISenseID Sense) const
 
FVector GetReceiverLocation (const FAISenseID Sense) const
 
bool HasKnownStimulusOfSense (const FAISenseID Sense) const
 
bool IsSenseActive (const FAISenseID Sense) const
 
AIMODULE_API void Merge (const FActorPerceptionInfo &Other)
 

Public Attributes

TWeakObjectPtr< AActorTarget
 
TArray< FAIStimulusLastSensedStimuli
 
FAISenseID DominantSense
 
uint32 bIsHostile: 1
 
uint32 bIsFriendly: 1
 

Constructor & Destructor Documentation

◆ FActorPerceptionInfo()

FActorPerceptionInfo::FActorPerceptionInfo ( AActor InTarget = nullptr)
inlineexplicit

Member Function Documentation

◆ GetLastStimulusLocation()

FVector FActorPerceptionInfo::GetLastStimulusLocation ( float OptionalAge = nullptr) const
inline

Retrieves last known location. Active (last reported as "successful") stimuli are preferred.

◆ GetReceiverLocation()

FVector FActorPerceptionInfo::GetReceiverLocation ( const FAISenseID  Sense) const
inline

Retrieves receiver location of the last sense stimuli for a given sense

Parameters
SenseThe AISenseID of the sense
Returns
Location of the receiver for the last sensed stimuli or FAISystem::InvalidLocation if given sense has never registered related Target actor or last stimuli has expired.

◆ GetStimulusLocation()

FVector FActorPerceptionInfo::GetStimulusLocation ( const FAISenseID  Sense) const
inline

Retrieves location of the last sensed stimuli for a given sense

Parameters
SenseThe AISenseID of the sense
Returns
Location of the last sensed stimuli or FAISystem::InvalidLocation if given sense has never registered related Target actor or if last stimuli has expired.

◆ HasAnyCurrentStimulus()

bool FActorPerceptionInfo::HasAnyCurrentStimulus ( ) const
inline

Indicates currently live (visible) stimulus from any sense

◆ HasAnyKnownStimulus()

bool FActorPerceptionInfo::HasAnyKnownStimulus ( ) const
inline

it includes both currently live (visible) stimulus, as well as "remembered" ones

◆ HasKnownStimulusOfSense()

bool FActorPerceptionInfo::HasKnownStimulusOfSense ( const FAISenseID  Sense) const
inline

Indicates a currently active or "remembered" stimuli for a given sense

Parameters
SenseThe AISenseID of the sense
Returns
True if a target has been registered (even if not currently sensed) for the given sense and the stimuli is not expired.

◆ IsSenseActive()

bool FActorPerceptionInfo::IsSenseActive ( const FAISenseID  Sense) const
inline

Indicates a currently active stimuli for a given sense

Parameters
SenseThe AISenseID of the sense
Returns
True if a target is still sensed for the given sense and the stimuli is not expired.

◆ Merge()

void FActorPerceptionInfo::Merge ( const FActorPerceptionInfo Other)

takes all "newer" info from Other and absorbs it

Member Data Documentation

◆ bIsFriendly

uint32 FActorPerceptionInfo::bIsFriendly

indicates whether this Actor is friendly to perception holder

◆ bIsHostile

uint32 FActorPerceptionInfo::bIsHostile

indicates whether this Actor is hostile to perception holder

◆ DominantSense

FAISenseID FActorPerceptionInfo::DominantSense

if != MAX indicates the sense that takes precedence over other senses when it comes to determining last stimulus location

◆ LastSensedStimuli

TArray<FAIStimulus> FActorPerceptionInfo::LastSensedStimuli

◆ Target

TWeakObjectPtr<AActor> FActorPerceptionInfo::Target

The documentation for this struct was generated from the following files: