| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/AIModule/Classes/Perception/PawnSensingComponent.h |
Include |
#include "Perception/PawnSensingComponent.h" |
class UPawnSensingComponent : public UActorComponent
SensingComponent encapsulates sensory (ie sight and hearing) settings and functionality for an Actor, allowing the actor to see/hear Pawns in the world. It does nothing on network clients.
Name | Description | ||
---|---|---|---|
|
uint32: 1 |
bEnableSensingUpdates |
If true, component will perform sensing updates. |
|
uint32: 1 |
bHearNoises |
If true, we will perform audibility tests and will be notified when a Pawn makes a noise that can be heard. |
|
uint32: 1 |
bOnlySensePlayers |
If true, will only sense player-controlled pawns in the world. Default: true |
|
uint32: 1 |
bSeePawns |
If true, we will perform visibility tests and will trigger notifications when a Pawn is visible. |
|
float |
HearingMaxSoundAge |
Max age of sounds we can hear. Should be greater than SensingInterval, or you might miss hearing some sounds! |
|
float |
HearingThreshold |
Max distance at which a makenoise(1.0) loudness sound can be heard, regardless of occlusion |
|
float |
LOSHearingThreshold |
Max distance at which a makenoise(1.0) loudness sound can be heard if unoccluded (LOSHearingThreshold should be > HearingThreshold) |
|
OnHearNoise |
Delegate to execute when we hear a noise from a Pawn's PawnNoiseEmitterComponent. |
|
|
OnSeePawn |
Delegate to execute when we see a Pawn. |
|
|
float |
PeripheralVisionAngle |
How far to the side AI can see, in degrees. |
|
float |
PeripheralVisionCosine |
Cosine of limits of peripheral vision. Computed from PeripheralVisionAngle. |
|
float |
SensingInterval |
Amount of time between pawn sensing updates. |
|
float |
SightRadius |
Maximum sight distance. |
|
TimerHandle_OnTimer |
Handle for efficient management of OnTimer timer |
Name | Description | |
---|---|---|
|
UPawnSensingComponent ( |
Name | Description | ||
---|---|---|---|
|
BroadcastOnHearLocalNoise |
Broadcasts notification that our sensor hears a noise made local to a Pawn's position, using the OnHearNoise delegates. |
|
|
BroadcastOnHearRemoteNoise |
Broadcasts notification that our sensor hears a noise made remotely from a Pawn's position, using the OnHearNoise delegates. |
|
|
BroadcastOnSeePawn ( |
Broadcasts notification that our sensor sees a Pawn, using the OnSeePawn delegates. |
|
|
CanHear |
True if sensor can hear this noise. |
|
|
CanSenseAnything() |
Are we capable of sensing anything (and do we have any callbacks that care about sensing)? If so UpdateAISensing() will be called every sensing interval. |
|
|
CouldSeePawn |
Chance of seeing other pawn decreases with increasing distance or angle in peripheral vision |
|
|
float |
GetPeripheralVisionAngle() |
|
|
float |
GetPeripheralVisionCosine() |
|
|
AActor * |
GetSensorActor() |
|
|
AController ... |
GetSensorController() |
|
|
GetSensorLocation() |
Get position where hearing/seeing occurs (i.e. ear/eye position). |
|
|
GetSensorRotation() |
Get the rotation of this sensor. We need this for the sight component |
|
|
HasLineOfSightTo ( |
Check line to other actor. |
|
|
IsNoiseRelevant ( |
Test whether the noise is loud enough and recent enough to care about. |
|
|
IsSensorActor ( |
Is the given actor our owner? Used to ensure that we are not trying to sense our self / our owner. |
|
|
OnTimer() |
Update function called on timer intervals. |
|
|
SensePawn ( |
See if there are interesting sounds and sights that we want to detect, and respond to them if so. |
|
|
SetPeripheralVisionAngle ( |
Sets PeripheralVisionAngle. Calculates PeripheralVisionCosine from PeripheralVisionAngle |
|
|
SetSensingInterval ( |
Changes the SensingInterval. |
|
|
SetSensingUpdatesEnabled ( |
Enables or disables sensing updates. The timer is reset in either case. |
|
|
SetTimer ( |
Modify the timer to fire in TimeDelay seconds. A value <= 0 disables the timer. |
|
|
ShouldCheckAudibilityOf ( |
Returns true if we should check whether we can hear the given Pawn (because we are able to hear, and the Pawn has the correct team relationship to us) |
|
|
ShouldCheckVisibilityOf ( |
Returns true if we should check whether the given Pawn is visible (because we can see things, the Pawn is not hidden, and if the Pawn is a player and we only see players) |
|
|
UpdateAISensing() |
Calls SensePawn on any Pawns that we are allowed to sense. |
Name | Description | ||
---|---|---|---|
|
InitializeComponent() |
Initializes the component. |
Name |
Description |
|
---|---|---|
|
FHearNoiseDelegate |
|
|
FSeePawnDelegate |