UAISense_Sight

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/Perception/AISense_Sight.h

Include

#include "Perception/AISense_Sight.h"

Syntax

class UAISense_Sight : public UAISense

Variables

Name Description

Public variable

bool

 

bSightQueriesOutOfRangeDirty

Protected variable

ECollisionChann...

 

DefaultSightCollisionChannel

Public variable

TMap< FPercepti...

 

DigestedProperties

Protected variable

float

 

HighImportanceDistanceSquare

Protected variable

float

 

HighImportanceQueryDistanceThreshold

Protected variable

float

 

MaxQueryImportance

Protected variable

double

 

MaxTimeSlicePerTick

Protected variable

int32

 

MaxTracesPerTick

Protected variable

int32

 

MinQueriesPerTimeSliceCheck

Public variable

int32

 

NextOutOfRangeIndex

The SightQueries are a n^2 problem and to reduce the sort time, they are now split between in range and out of range Since the out of range queries only age as the distance component of the score is always 0, there is few need to sort them In the majority of the cases most of the queries are out of range, so the sort time is greatly reduced as we only sort the in range queries

Public variable

FTargetsContain...

 

ObservedTargets

Protected variable

float

 

SightLimitQueryImportance

Public variable

TArray< FAISigh...

 

SightQueriesInRange

Public variable

TArray< FAISigh...

 

SightQueriesOutOfRange

Constructors

Name Description

Public function

UAISense_Sight

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Const

float

 

CalcQueryImportance

(
    const FPerceptionListener& Listene...,
    const FVector& TargetLocation,
    const float SightRadiusSq
)

Protected function

void

 

GenerateQueriesForListener

(
    const FPerceptionListener& Listene...,
    const FDigestedSightProperties& Pr...,
    const TFunction< void...
)

Protected function

void

 

OnListenerRemovedImpl

(
    const FPerceptionListener& Removed...
)

Protected function

void

 

OnListenerUpdateImpl

(
    const FPerceptionListener& Updated...
)

Protected function

void

 

OnNewListenerImpl

(
    const FPerceptionListener& NewList...
)

Public function

void

 

RegisterEvent

(
    const FAISightEvent& Event
)

Protected function

bool

 

RegisterTarget

(
    AActor& TargetActor,
    const TFunction< void...
)

Returns information whether new LoS queries have been added

Protected function

void

 

RemoveAllQueriesByListener

(
    const FPerceptionListener& Listene...,
    const TFunction< void...
)

Protected function

void

 

RemoveAllQueriesToTarget

(
    const FAISightTarget::FTargetId& T...,
    const TFunction< void...
)

Protected function Virtual Const

bool

 

ShouldAutomaticallySeeTarget

(
    const FDigestedSightProperties& Pr...,
    FAISightQuery* SightQuery,
    FPerceptionListener& Listener,
    AActor* TargetActor,
    float& OutStimulusStrength
)

Overridden from UAISense

Name Description

Protected function Virtual

void

 

OnListenerConfigUpdated

(
    const FPerceptionListener& Updated...
)

Public function Virtual

void

 

OnListenerForgetsActor

(
    const FPerceptionListener& Listene...,
    AActor& ActorToForget
)

Public function Virtual

void

 

OnListenerForgetsAll

(
    const FPerceptionListener& Listene...
)

Public function Virtual

void

 

RegisterSource

(
    AActor& SourceActors
)

Virtual void RegisterSources(TArray SourceActors) {}

Public function Virtual

void

 

UnregisterSource

(
    AActor& SourceActor
)

Protected function Virtual

float

 

Update()

Overridden from UObject

Name Description

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Classes

Name

Description

Public struct

FDigestedSightProperties

Enums

Name

Description

Protected enum

FQueriesOperationPostProcess

Typedefs

Name

Description

FTargetsContainer

Deprecated Functions

Name Description

Protected function

bool

 

RegisterTarget

(
    AActor& TargetActor,
    FQueriesOperationPostProcess PostPr...,
    TFunctionRef< void&)...
)

Use RegisterTarget without unneeded PostProcess parameter.

Protected function

bool

 

RegisterTarget

(
    AActor& TargetActor,
    FQueriesOperationPostProcess PostPr...
)

Use RegisterTarget without unneeded PostProcess parameter.

Protected function

void

 

RemoveAllQueriesByListener

(
    const FPerceptionListener& Listene...,
    FQueriesOperationPostProcess PostPr...,
    TFunctionRef< void...
)

Use RemoveAllQueriesByListener without unneeded PostProcess parameter.

Protected function

void

 

RemoveAllQueriesByListener

(
    const FPerceptionListener& Listene...,
    FQueriesOperationPostProcess PostPr...
)

Use RemoveAllQueriesByListener without unneeded PostProcess parameter.

Protected function

void

 

RemoveAllQueriesToTarget

(
    const FAISightTarget::FTargetId& T...,
    FQueriesOperationPostProcess PostPr...,
    TFunctionRef< void...
)

Use RemoveAllQueriesToTarget without unneeded PostProcess parameter.

Protected function

void

 

RemoveAllQueriesToTarget

(
    const FAISightTarget::FTargetId& T...,
    FQueriesOperationPostProcess PostPr...
)

Use RemoveAllQueriesToTarget without unneeded PostProcess parameter.

Public function

void

 

SortQueries()

Not needed anymore done automatically at the beginning of each update.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss