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. This component supports a basic version of the RVO avoidance interface to make it usable with Detour Crowd Avoidance. It does not support force based RVO avoidance, but this or child component would be a good place to update/evaluate Avoidance information and apply effects to the Mover Simulation. 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 ,
public IRVOAvoidanceInterface
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 |
|---|---|---|---|---|
| AvoidanceConsiderationRadius | float | DefaultMovementSet/NavMoverComponent.h |
|
|
| AvoidanceGroup | FNavAvoidanceMask | Moving actor's group mask | DefaultMovementSet/NavMoverComponent.h |
|
| AvoidanceUID | int32 | No default value, for now it's assumed to be valid if GetAvoidanceManager() returns non-NULL. | DefaultMovementSet/NavMoverComponent.h |
|
| AvoidanceWeight | float | De facto default value 0.5 (due to that being the default in the avoidance registration function), indicates RVO behavior. | DefaultMovementSet/NavMoverComponent.h |
|
| GroupsToAvoid | FNavAvoidanceMask | Will avoid other agents if they are in one of specified groups | DefaultMovementSet/NavMoverComponent.h |
|
| GroupsToIgnore | FNavAvoidanceMask | Will NOT avoid other agents if they are in one of specified groups, higher priority than GroupsToAvoid | DefaultMovementSet/NavMoverComponent.h |
|
| 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 |
|
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 |
|
void SetAvoidanceGroupMask
(
const FNavAvoidanceMask& GroupMask |
DefaultMovementSet/NavMoverComponent.h |
|
|
void SetGroupsToAvoidMask
(
const FNavAvoidanceMask& GroupMask |
DefaultMovementSet/NavMoverComponent.h |
|
|
void SetGroupsToIgnoreMask
(
const FNavAvoidanceMask& GroupMask |
DefaultMovementSet/NavMoverComponent.h |
|
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 GetAvoidanceGroupMask() |
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 | |
virtual int32 GetGroupsToAvoidMask() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual int32 GetGroupsToIgnoreMask() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual float GetRVOAvoidanceConsiderationRadius() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual float GetRVOAvoidanceHeight() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual FVector GetRVOAvoidanceOrigin() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual float GetRVOAvoidanceRadius() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual int32 GetRVOAvoidanceUID() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual float GetRVOAvoidanceWeight() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual FVector GetVelocityForRVOConsideration() |
DefaultMovementSet/NavMoverComponent.h | ||
virtual void SetAvoidanceGroupMask
(
int32 GroupFlags |
DefaultMovementSet/NavMoverComponent.h | ||
virtual void SetGroupsToAvoidMask
(
int32 GroupFlags |
DefaultMovementSet/NavMoverComponent.h | ||
virtual void SetGroupsToIgnoreMask
(
int32 GroupFlags |
DefaultMovementSet/NavMoverComponent.h | ||
virtual void SetRVOAvoidanceUID
(
int32 UID |
BEGIN IRVOAvoidanceInterface | DefaultMovementSet/NavMoverComponent.h | |
virtual void SetRVOAvoidanceWeight
(
float Weight |
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 const IPathFollowingAgentInterface * GetPathFollowingAgent () |
DefaultMovementSet/NavMoverComponent.h | ||
virtual 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 |