Language:
Discover
By Skill Level
By Category

UNavMovementComponent

Choose your OS:

Inheritance Hierarchy

Syntax

class UNavMovementComponent : public UMovementComponent

Remarks

NavMovementComponent defines base functionality for MovementComponents that move any 'agent' that may be involved in AI pathfinding.

Variables

Name Description

Protected variable

uint32 : 1

 

bStopMovementAbortPaths

If set, StopActiveMovement call will abort current path following request

Protected variable

uint32 : 1

 

bUpdateNavAgentWithOwnersCollision

If set to true NavAgentProps' radius and height will be updated with Owner's collision capsule size

Protected variable

uint32 : 1

 

bUseAccelerationForPaths

If set, pathfollowing will control character movement via acceleration values.

Protected variable

uint32 : 1

 

bUseFixedBrakingDistanceForPaths

If set, FixedPathBrakingDistance will be used for path following deceleration

Protected variable

float

 

FixedPathBrakingDistance

Braking distance override used with acceleration driven path following (bUseAccelerationForPaths)

Public variable

FMovementProper ...

 

MovementState

Expresses runtime state of character's movement.

Public variable

FNavAgentProper ...

 

NavAgentProps

Properties that define how the component can move.

Constructors

Name Description

Public function

UNavMovementComponent

(
    const FObjectInitializer & ObjectIn...
)

-------------------------------------------------------------------// UMovementComponent -------------------------------------------------------------------//

Functions

Name Description

Public function

bool

 

CanEverCrouch()

True if component can crouch

Public function

bool

 

CanEverFly()

True if component can fly

Public function

bool

 

CanEverJump()

True if component can jump

Public function

bool

 

CanEverMoveOnGround()

True if component can move along the ground (walk, drive, etc)

Public function

bool

 

CanEverSwim()

True if component can swim

Public function Virtual

bool

 

CanStartPathFollowing()

True if path following can start

Public function 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)

Public function

void

 

ClearFixedBrakingDistance()

Clears fixed braking distance

Public function

FVector

 

GetActorFeetLocation()

Location of controlled actor's "feet" meaning center of bottom of collision bounding box

Public function Virtual

FBasedPositi ...

 

GetActorFeetLocationBased()

Based location of controlled actor

Public function

FVector

 

GetActorLocation()

Location of controlled actor - meaning center of collision bounding box

Public function

FVector

 

GetActorNavLocation()

Navigation location of controlled actor

Public function

FNavAgentPro ...

 

GetNavAgentPropertiesRef()

The NavAgentProps

Public function

const FNavAg ...

 

GetNavAgentPropertiesRef()

The NavAgentProps(const)

Public function

const IPathF ...

 

GetPathFollowingAgent()

Public function

IPathFollowi ...

 

GetPathFollowingAgent()

Public function Virtual

float

 

GetPathFollowingBrakingDistance

(
    float MaxSpeed
)

Braking distance for acceleration driven path following

Public function Virtual

bool

 

IsCrouching()

True if currently crouching

Public function Virtual

bool

 

IsFalling()

True if currently falling (not flying, in a non-fluid volume, and not on the ground)

Public function Virtual

bool

 

IsFlying()

True if currently flying (moving through a non-fluid volume without resting on the ground)

Public function

bool

 

IsJumpAllowed()

True if component is allowed to jump

Public function Virtual

bool

 

IsMovingOnGround()

True if currently moving on the ground (e.g. walking or driving)

Public function Virtual

bool

 

IsSwimming()

True if currently swimming (moving through a fluid volume)

Public function Virtual

void

 

RequestDirectMove

(
    const FVector & MoveVelocity,
    bool bForceMaxSpeed
)

Path following: request new velocity

Public function Virtual

void

 

RequestPathMove

(
    const FVector & MoveInput
)

Path following: request new move input (normal vector = full strength)

Public function

void

 

ResetMoveState()

Resets runtime movement state to character's movement capabilities

Public function

void

 

SetFixedBrakingDistance

(
    float DistanceToEndOfPath
)

Set fixed braking distance

Public function

void

 

SetJumpAllowed

(
    bool bAllowed
)

Public function

void

 

SetPathFollowingAgent

Public function

void

 

SetUpdateNavAgentWithOwnersCollisions

(
    bool bUpdateWithOwner
)

Public function

bool

 

ShouldUpdateNavAgentWithOwnersCollision()

Public function Virtual

void

 

StopActiveMovement()

Stops applying further movement (usually zeros acceleration).

Public function

void

 

StopMovementKeepPathing()

Stops movement immediately (reset velocity) but keeps following current path

Public function

void

 

UpdateNavAgent

(
    const AActor & InOwner
)

Public function

void

 

UpdateNavAgent

(
    const UCapsuleComponent & CapsuleCo...
)

Public function

bool

 

UseAccelerationForPathFollowing()

Overridden from UMovementComponent

Name Description

Public function Virtual

void

 

StopMovementImmediately()

Overridden to also call StopActiveMovement() .

References

Module

Engine

Header

Runtime/Engine/Classes/GameFramework/NavMovementComponent.h