Navigation
API > API/Plugins > API/Plugins/Mover
AsyncNavWalkingMode: a default movement mode for traversing surfaces and movement bases by using an active navmesh when moving the actor rather than collision checks. Note: This movement mode requires a NavMoverComponent be on the actor to function properly. This mode also contains some randomization to avoid navmesh look ups happening at the same time (which is fine for AI characters running on the server) but may cause issues if used on autonomous proxies. This mode simulates movement without actually modifying any scene component(s).
| Name | UAsyncNavWalkingMode |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Mover/Source/Mover/Public/DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
| Include Path | #include "DefaultMovementSet/Modes/AsyncNavWalkingMode.h" |
Syntax
UCLASS (MinimalAPI, Blueprintable, BlueprintType, Experimental)
class UAsyncNavWalkingMode : public UBaseMovementMode
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBaseMovementMode → UAsyncNavWalkingMode
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UAsyncNavWalkingMode() |
DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BehaviorOffNavMesh | EOffNavMeshBehavior | What should we do if we stray off the nav mesh? | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| bProjectNavMeshWalking | bool | Whether to raycast to underlying geometry to better conform navmesh-walking actors | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| bSlideAlongNavMeshEdge | bool | If attempting to stray off the nav mesh, should we slide along the edge instead? See @BehaviorOffNavMesh for cases where a sliding move can't be determined. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| bSweepWhileNavWalking | bool | Whether or not the actor should sweep for collision geometry while walking. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| CachedNavLocation | FNavLocation | Last known location projected on navmesh | DefaultMovementSet/Modes/AsyncNavWalkingMode.h | |
| NavMeshProjectionHeightScaleDown | float | Scale of the total capsule height to use for projection from navmesh to underlying geometry in the downward direction. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| NavMeshProjectionHeightScaleUp | float | Scale of the total capsule height to use for projection from navmesh to underlying geometry in the upward direction. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| NavMeshProjectionInterpSpeed | float | Speed at which to interpolate agent navmesh offset between traces. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| NavMeshProjectionInterval | float | How often we should raycast to project from navmesh to underlying geometry | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
| NavMeshProjectionTimer | float | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool FindNavFloor
(
const FVector& TestLocation, |
Project a location to navmesh to find adjusted height. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h | |
virtual void GenerateMove_Implementation
(
const FMoverTickStartData& StartState, |
DefaultMovementSet/Modes/AsyncNavWalkingMode.h | ||
UObject * GetTurnGenerator() |
Returns the active turn generator. Note: you will need to cast the return value to the generator you expect to get, it can also be none. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
void SetTurnGeneratorClass
(
TSubclassOf< UObject > TurnGeneratorClass |
Sets the active turn generator to use the class provided. Note: To set it back to the default implementation pass in none. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
|
virtual void SimulationTick_Implementation
(
const FSimulationTickParams& Params, |
DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
Overridden from UBaseMovementMode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Activate() |
These functions are called immediately when the state machine switches modes. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CaptureOutputState
(
const FMoverDefaultSyncState& StartSyncState, |
DefaultMovementSet/Modes/AsyncNavWalkingMode.h | ||
virtual void FindBestNavMeshLocation
(
const FVector& TraceStart, |
Performs trace for ProjectLocationFromNavMesh | DefaultMovementSet/Modes/AsyncNavWalkingMode.h | |
const INavigationDataInterface * GetNavData() |
Get Navigation data for the actor. Returns null if there is no associated nav data. | DefaultMovementSet/Modes/AsyncNavWalkingMode.h | |
virtual FVector ProjectLocationFromNavMesh
(
float DeltaSeconds, |
Attempts to better align navmesh walking actors with underlying geometry (sometimes navmesh can differ quite significantly from geometry). | DefaultMovementSet/Modes/AsyncNavWalkingMode.h |
Overridden from UBaseMovementMode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnRegistered
(
const FName ModeName |
DefaultMovementSet/Modes/AsyncNavWalkingMode.h | ||
virtual void OnUnregistered() |
DefaultMovementSet/Modes/AsyncNavWalkingMode.h |