Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/AI > API/Runtime/Engine/AI/Navigation
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UAvoidanceManager
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/AI/Navigation/AvoidanceManager.h |
| Include | #include "AI/Navigation/AvoidanceManager.h" |
Syntax
class UAvoidanceManager :
public UObject,
public FSelfRegisteringExec
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FVelocityAvoidanceCone > | AllCones | Keeping this here to avoid constant allocation | |
| float | ArtificialRadiusExpansion | Multiply the radius of all STORED avoidance objects by this value to allow a little extra room for avoidance maneuvers. | |
| TMap< int32, FNavAvoidanceData > | AvoidanceObjects | All objects currently part of the avoidance solution. This is pretty transient stuff. | |
| uint32: 1 | bAutoPurgeOutdatedObjects | If set then UAvoidanceManager::RemoveOutdatedObjects is responsisble for removing dead entries in AvoidanceObjects. | |
| bool | bDebugAll | ||
| uint32: 1 | bRequestedUpdateTimer | Set when RemoveOutdatedObjects timer is already requested | |
| TArray< int32 > | DebugUIDs | Print out debug information when we predict using any of these IDs as our IgnoreUID | |
| float | DefaultTimeToLive | How long an avoidance UID must not be updated before the system will put it back in the pool. | |
| float | DeltaTimeToPredict | This is how far forward in time (seconds) we extend our velocity cones and thus our prediction | |
| INavEdgeProviderInterface * | EdgeProviderInterface | ||
| TWeakObjectPtr< UObject > | EdgeProviderOb | Provider of navigation edges to consider for avoidance | |
| float | HeightCheckMargin | Allowable height margin between obstacles and agents. | |
| float | LockTimeAfterAvoid | How long to stay on course (barring collision) after making an avoidance move | |
| float | LockTimeAfterClean | How long to stay on course (barring collision) after making an unobstructed move (should be > 0.0, but can be less than a full frame) | |
| TArray< int32 > | NewKeyPool | This is a pool of keys to be used when new objects are created. | |
| FTimerHandle | TimerHandle_RemoveOutdatedObjects | Handle for efficient management of RemoveOutdatedObjects timer |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UAvoidanceManager
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AvoidanceDebugForAll
(
bool TurnOn |
||
| void | AvoidanceDebugForUID
(
int32 AvoidanceUID, |
||
| void | AvoidanceSystemToggle
(
bool TurnOn |
||
| const FNavAvoidanceData * | GetAvoidanceObjectForUID
(
int32 AvoidanceUID |
||
| FNavAvoidanceData * | GetAvoidanceObjectForUID
(
int32 AvoidanceUID |
Get your latest data. | |
| FVector | GetAvoidanceVelocity
(
const FNavAvoidanceData& AvoidanceData, |
Only use if you want manual velocity planning. | |
| FVector | GetAvoidanceVelocity_Internal
(
const FNavAvoidanceData& AvoidanceData, |
This is called by our blueprint-accessible functions, and permits the user to ignore self, or not. | |
| FVector | GetAvoidanceVelocityForComponent
(
UCharacterMovementComponent* MovementComp |
Fast-track GetAvoidanceVelocityForComponent(UMovementComponent) implementation for most common case of UCharacterMovementComponent | |
| FVector | GetAvoidanceVelocityForComponent
(
UMovementComponent* MovementComp |
Calculate avoidance velocity for component (avoids collisions with the supplied component) | |
| FVector | GetAvoidanceVelocityIgnoringUID
(
const FNavAvoidanceData& AvoidanceData, |
Only use if you want manual velocity planning. | |
| int32 | Get appropriate UID for use when reporting to this function or requesting RVO assistance. | ||
| int32 | Get the number of avoidance objects currently in the manager. | ||
| void | HandleToggleAvoidance
(
const TCHAR* Cmd, |
||
| void | HandleToggleDebugAll
(
const TCHAR* Cmd, |
Exec command handlers | |
| bool | Returns true if the avoidance objects are auto purged in RemoveOutdatedObjects | ||
| bool | IsDebugEnabled
(
int32 AvoidanceUID |
||
| bool | |||
| bool | IsDebugOnForUID
(
int32 AvoidanceUID |
||
| void | OverrideToMaxWeight
(
int32 AvoidanceUID, |
For Duration seconds, set this object to ignore all others. | |
| bool | RegisterMovementComponent
(
UMovementComponent* MovementComp, |
Register with the given avoidance manager. | |
| bool | RegisterMovementComponent
(
UCharacterMovementComponent* MovementComp, |
||
| void | RemoveAvoidanceObject
(
const int32 AvoidanceUID |
Used to manually mark data associated with given ID as 'dead' (and reusable) | |
| void | Cleanup AvoidanceObjects, called by timer | ||
| void | Try to set a timer for RemoveOutdatedObjects | ||
| void | SetNavEdgeProvider
(
INavEdgeProviderInterface* InEdgeProvider |
||
| void | UpdateRVO
(
UMovementComponent* MovementComp |
Update the RVO avoidance data for the participating UMovementComponent | |
| void | UpdateRVO
(
UCharacterMovementComponent* MovementComp |
Fast-track UpdateRVO(UMovementComponent) implementation for most common case of UCharacterMovementComponent | |
| void | UpdateRVO_Internal
(
int32 AvoidanceUID, |
This is called by our blueprint-accessible function after it has packed the data into an object. |
Overridden from FExec
| Type | Name | Description | |
|---|---|---|---|
| bool | Exec_Dev
(
UWorld* InWorld, |
Implementation of Exec that is only called in non-shipping targets |
Constants
| Name | Description |
|---|---|
| bSystemActive | Main switch for avoidance system |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32: 1 | bAutoPurceOutdatedObjects | Please use bAutoPurgeOutdatedObjects instead. | |
| float | TestHeightDifference_DEPRECATED | Deprecated - use HeightCheckMargin, generally a much smaller value. |