Navigation
API > API/Plugins > API/Plugins/Mover
NavMoverComponent: Responsible for implementing INavMoveInterface with UMoverComponent so pathfinding and other forms of navigation movement work. This component also caches the input given to it that is then consumed by the mover system. Note: This component relies on the parent actor having a MoverComponent as well. By default this component only has a reference to MoverComponent meaning we use other ways (such as gameplay tags for the active movement mode) to check for state rather than calling specific functions on the active MoverComponent.
| Name | UNavMoverComponent |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Mover/Source/Mover/Public/DefaultMovementSet/NavMoverComponent.h |
| Include Path | #include "DefaultMovementSet/NavMoverComponent.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Meta=(BlueprintSpawnableComponent))
class UNavMoverComponent :
public UActorComponent ,
public INavMovementInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UNavMoverComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UNavMoverComponent() |
DefaultMovementSet/NavMoverComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MovementState | FMovementProperties | Expresses runtime state of character's movement. | DefaultMovementSet/NavMoverComponent.h | |
| NavAgentProps | FNavAgentProperties | Properties that define how the component can move. | DefaultMovementSet/NavMoverComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MoverComponent | TWeakObjectPtr< UMoverComponent > | Associated Movement component that will actually move the actor | DefaultMovementSet/NavMoverComponent.h | |
| PathFollowingComp | TWeakInterfacePtr< IPathFollowingAgentInterface > | Object implementing IPathFollowingAgentInterface. | DefaultMovementSet/NavMoverComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ConsumeNavMovementData
(
FVector& OutMoveInputIntent, |
Writes internal cached requested velocities to the MoveInput passed in. Returns true if it had move input to write. | DefaultMovementSet/NavMoverComponent.h |
|
virtual FVector GetFeetLocationAt
(
FVector ComponentLocation |
Returns location of controlled actor's "feet": the center bottom of its collision bounding box, as if it was at a specific location | DefaultMovementSet/NavMoverComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual void InitializeComponent() |
DefaultMovementSet/NavMoverComponent.h |
Overridden from INavMovementInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanStartPathFollowing() |
Returns true if path following can start | DefaultMovementSet/NavMoverComponent.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) | DefaultMovementSet/NavMoverComponent.h | |
virtual FVector GetFeetLocation() |
Returns location of controlled actor's "feet": the center bottom of its collision bounding box at its current location | DefaultMovementSet/NavMoverComponent.h | |
virtual FBasedPosition GetFeetLocationBased() |
Returns based location of controlled actor | DefaultMovementSet/NavMoverComponent.h | |
virtual FVector GetForwardVector() |
Get forward vector of the object being driven by nav movement | DefaultMovementSet/NavMoverComponent.h | |
virtual FVector GetLocation() |
Returns location of controlled actor - meaning center of collision bounding box | DefaultMovementSet/NavMoverComponent.h | |
virtual float GetMaxSpeedForNavMovement() |
Get the max speed of the movement component | DefaultMovementSet/NavMoverComponent.h |
|
virtual FNavAgentProperties & GetNavAgentPropertiesRef () |
Returns the NavAgentProps | DefaultMovementSet/NavMoverComponent.h | |
virtual const FNavAgentProperties & GetNavAgentPropertiesRef () |
Returns the NavAgentProps(const) | DefaultMovementSet/NavMoverComponent.h | |
virtual const FNavMovementProperties & GetNavMovementProperties () |
Returns the NavMovementProps(const) | DefaultMovementSet/NavMoverComponent.h | |
virtual FNavMovementProperties * GetNavMovementProperties () |
Get Nav movement props struct this component uses | DefaultMovementSet/NavMoverComponent.h | |
virtual UObject * GetOwnerAsObject() |
Get the owner of the object consuming nav movement | DefaultMovementSet/NavMoverComponent.h | |
virtual IPathFollowingAgentInterface * GetPathFollowingAgent () |
DefaultMovementSet/NavMoverComponent.h | ||
virtual const IPathFollowingAgentInterface * GetPathFollowingAgent () |
DefaultMovementSet/NavMoverComponent.h | ||
virtual void GetSimpleCollisionCylinder
(
float& CollisionRadius, |
Get axis-aligned cylinder around this actor, used for simple collision checks in nav movement | DefaultMovementSet/NavMoverComponent.h | |
virtual FVector GetSimpleCollisionCylinderExtent() |
Returns collision extents vector for this object, based on GetSimpleCollisionCylinder. | DefaultMovementSet/NavMoverComponent.h | |
virtual TObjectPtr< UObject > GetUpdatedObject() |
Get the component this movement component is updating | DefaultMovementSet/NavMoverComponent.h | |
virtual FVector GetVelocityForNavMovement() |
Get the current velocity of the movement component | DefaultMovementSet/NavMoverComponent.h |
|
virtual bool IsCrouching() |
Returns true if currently crouching | DefaultMovementSet/NavMoverComponent.h | |
virtual bool IsFalling() |
Returns true if currently falling (not flying, in a non-fluid volume, and not on the ground) | DefaultMovementSet/NavMoverComponent.h | |
virtual bool IsFlying() |
Returns true if currently flying (moving through a non-fluid volume without resting on the ground) | DefaultMovementSet/NavMoverComponent.h | |
virtual bool IsMovingOnGround() |
Returns true if currently moving on the ground (e.g. walking or driving) | DefaultMovementSet/NavMoverComponent.h | |
virtual bool IsSwimming() |
Returns true if currently swimming (moving through a fluid volume) | DefaultMovementSet/NavMoverComponent.h |
|
virtual void RequestDirectMove
(
const FVector& MoveVelocity, |
Path following: request new velocity | DefaultMovementSet/NavMoverComponent.h | |
virtual void RequestPathMove
(
const FVector& MoveInput |
Path following: request new move input (normal vector = full strength) | DefaultMovementSet/NavMoverComponent.h | |
virtual void ResetMoveState() |
Resets runtime movement state to character's movement capabilities | DefaultMovementSet/NavMoverComponent.h | |
virtual void SetPathFollowingAgent
(
IPathFollowingAgentInterface* InPathFollowingAgent |
DefaultMovementSet/NavMoverComponent.h | ||
virtual void StopMovementImmediately() |
Overridden to also call StopActiveMovement(). | DefaultMovementSet/NavMoverComponent.h | |
virtual void UpdateNavAgent
(
const UObject& ObjectToUpdateFrom |
Set nav agent properties from an object | DefaultMovementSet/NavMoverComponent.h |