Navigation
API > API/Runtime > API/Runtime/Engine
NavMovementComponent defines base functionality for MovementComponents that move any 'agent' that may be involved in AI pathfinding.
| Name | UNavMovementComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/NavMovementComponent.h |
| Include Path | #include "GameFramework/NavMovementComponent.h" |
Syntax
UCLASS (Abstract, Config=Engine, MinimalAPI)
class UNavMovementComponent :
public UMovementComponent ,
public INavMovementInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UMovementComponent → UNavMovementComponent
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UNavMovementComponent
(
const FObjectInitializer& ObjectInitializer |
GameFramework/NavMovementComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MovementState | FMovementProperties | Expresses runtime state of character's movement. | GameFramework/NavMovementComponent.h | |
| NavAgentProps | FNavAgentProperties | Properties that define how the component can move. | GameFramework/NavMovementComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PathFollowingComp | TObjectPtr< UObject > | Object implementing IPathFollowingAgentInterface. | GameFramework/NavMovementComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearFixedBrakingDistance() |
Clears fixed braking distance | GameFramework/NavMovementComponent.h | |
virtual FVector GetActorFeetLocation() |
Returns location of controlled actor's "feet" meaning center of bottom of collision bounding box | GameFramework/NavMovementComponent.h | |
virtual FBasedPosition GetActorFeetLocationBased() |
Returns based location of controlled actor | GameFramework/NavMovementComponent.h | |
FVector GetActorLocation() |
Returns location of controlled actor - meaning center of collision bounding box | GameFramework/NavMovementComponent.h | |
FVector GetActorNavLocation() |
Returns navigation location of controlled actor | GameFramework/NavMovementComponent.h | |
FTransform GetActorTransform() |
Returns the full world-coordinates transform of the associated scene component (the UpdatedComponent) | GameFramework/NavMovementComponent.h | |
bool IsJumpAllowed() |
Returns true if component is allowed to jump | GameFramework/NavMovementComponent.h | |
void SetJumpAllowed
(
bool bAllowed |
Sets whether this component is allowed to jump | GameFramework/NavMovementComponent.h | |
void SetUpdateNavAgentWithOwnersCollisions
(
bool bUpdateWithOwner |
GameFramework/NavMovementComponent.h | ||
bool ShouldUpdateNavAgentWithOwnersCollision() |
GameFramework/NavMovementComponent.h |
Overridden from UMovementComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void StopMovementImmediately() |
Overridden to also call StopActiveMovement(). | GameFramework/NavMovementComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
GameFramework/NavMovementComponent.h | ||
virtual void Serialize
(
FArchive& Ar |
GameFramework/NavMovementComponent.h |
Overridden from INavMovementInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanStartPathFollowing() |
Returns true if path following can start | GameFramework/NavMovementComponent.h | |
virtual bool CanStopPathFollowing() |
Check if current move target can be reached right now if positions are matching (e.g. performing scripted move and can't stop) | GameFramework/NavMovementComponent.h | |
virtual FVector GetFeetLocation() |
Returns location of controlled actor's "feet" meaning center of bottom of collision bounding box | GameFramework/NavMovementComponent.h | |
virtual FBasedPosition GetFeetLocationBased() |
Returns based location of controlled actor | GameFramework/NavMovementComponent.h | |
virtual FVector GetForwardVector() |
Get forward vector of the object being driven by nav movement | GameFramework/NavMovementComponent.h | |
virtual FVector GetLocation() |
Returns location of controlled actor - meaning center of collision bounding box | GameFramework/NavMovementComponent.h | |
virtual float GetMaxSpeedForNavMovement() |
Get maximum movement speed of the agent | GameFramework/NavMovementComponent.h | |
virtual FNavAgentProperties & GetNavAgentPropertiesRef () |
Returns the NavAgentProps | GameFramework/NavMovementComponent.h | |
virtual const FNavAgentProperties & GetNavAgentPropertiesRef () |
Returns the NavAgentProps(const) | GameFramework/NavMovementComponent.h | |
virtual const FNavMovementProperties & GetNavMovementProperties () |
Returns the NavMovementProps(const) | GameFramework/NavMovementComponent.h | |
virtual FNavMovementProperties * GetNavMovementProperties () |
Get Nav movement props struct this component uses | GameFramework/NavMovementComponent.h | |
virtual UObject * GetOwnerAsObject() |
Get the owner of the object consuming nav movement | GameFramework/NavMovementComponent.h | |
virtual IPathFollowingAgentInterface * GetPathFollowingAgent () |
Get path following agent this interface uses | GameFramework/NavMovementComponent.h | |
virtual const IPathFollowingAgentInterface * GetPathFollowingAgent () |
Get path following agent this interface uses(const) | GameFramework/NavMovementComponent.h | |
virtual void GetSimpleCollisionCylinder
(
float& CollisionRadius, |
Get axis-aligned cylinder around this actor, used for simple collision checks in nav movement | GameFramework/NavMovementComponent.h | |
virtual FVector GetSimpleCollisionCylinderExtent() |
Returns collision extents vector for this object, based on GetSimpleCollisionCylinder. | GameFramework/NavMovementComponent.h | |
virtual TObjectPtr< UObject > GetUpdatedObject() |
Get the component this movement component is updating | GameFramework/NavMovementComponent.h | |
virtual FVector GetVelocityForNavMovement() |
Get the current velocity of the movement component | GameFramework/NavMovementComponent.h |
|
virtual bool IsCrouching() |
Returns true if currently crouching | GameFramework/NavMovementComponent.h |
|
virtual bool IsFalling() |
Returns true if currently falling (not flying, in a non-fluid volume, and not on the ground) | GameFramework/NavMovementComponent.h |
|
virtual bool IsFlying() |
Returns true if currently flying (moving through a non-fluid volume without resting on the ground) | GameFramework/NavMovementComponent.h |
|
virtual bool IsMovingOnGround() |
Returns true if currently moving on the ground (e.g. walking or driving) | GameFramework/NavMovementComponent.h |
|
virtual bool IsSwimming() |
Returns true if currently swimming (moving through a fluid volume) | GameFramework/NavMovementComponent.h |
|
virtual void RequestDirectMove
(
const FVector& MoveVelocity, |
Path following: request new velocity | GameFramework/NavMovementComponent.h | |
virtual void RequestPathMove
(
const FVector& MoveInput |
Path following: request new move input (normal vector = full strength) | GameFramework/NavMovementComponent.h | |
virtual void ResetMoveState() |
Resets runtime movement state to character's movement capabilities | GameFramework/NavMovementComponent.h | |
virtual void SetPathFollowingAgent
(
IPathFollowingAgentInterface* InPathFollowingAgent |
Set the path following agent this interface uses. | GameFramework/NavMovementComponent.h | |
virtual void UpdateNavAgent
(
const UObject& ObjectToUpdateFrom |
Set nav agent properties from an object | GameFramework/NavMovementComponent.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bStopMovementAbortPaths_DEPRECATED | uint8 | If set, StopActiveMovement call will abort current path following request | GameFramework/NavMovementComponent.h | |
| bUpdateNavAgentWithOwnersCollision_DEPRECATED | uint8 | If set to true NavAgentProps' radius and height will be updated with Owner's collision capsule size | GameFramework/NavMovementComponent.h |
|
| bUseAccelerationForPaths_DEPRECATED | uint8 | If set, pathfollowing will control character movement via acceleration values. | GameFramework/NavMovementComponent.h |
|
| bUseFixedBrakingDistanceForPaths_DEPRECATED | uint8 | If set, FixedPathBrakingDistance will be used for path following deceleration | GameFramework/NavMovementComponent.h |
|
| FixedPathBrakingDistance_DEPRECATED | float | Braking distance override used with acceleration driven path following (bUseAccelerationForPaths) | GameFramework/NavMovementComponent.h |
|