UPawnMovementComponent

PawnMovementComponent can be used to update movement for an associated Pawn.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/PawnMovementComponent.h

Include

#include "GameFramework/PawnMovementComponent.h"

Syntax

class UPawnMovementComponent : public UNavMovementComponent

Remarks

PawnMovementComponent can be used to update movement for an associated Pawn. It also provides ways to accumulate and read directional input in a generic way (with AddInputVector(), ConsumeInputVector(), etc).

Variables

Name Description

Protected variable

APawn *

 

PawnOwner

Pawn that owns this component.

Functions

Name Description

Public function Virtual

void

 

AddInputVector

(
    FVector WorldVector,
    bool bForce
)

Adds the given vector to the accumulated input in world space.

Public function Virtual

FVector

 

ConsumeInputVector()

Returns the pending input vector and resets it to zero.

Public function Const

FVector

 

GetLastInputVector()

Return the last input vector in world space that was processed by ConsumeInputVector(), which is usually done by the Pawn or PawnMovementComponent.

Public function Const

APawn *

 

GetPawnOwner()

Return the Pawn that owns UpdatedComponent.

Public function Const

FVector

 

GetPendingInputVector()

Return the pending input vector in world space.

Public function Virtual Const

bool

 

IsMoveInputIgnored()

Helper to see if move input is ignored.

Protected function

void

 

MarkForClientCameraUpdate()

Attempts to mark the PlayerCameraManager as dirty.

Public function Virtual

void

 

NotifyBumpedPawn

(
    APawn* BumpedPawn
)

Notify of collision in case we want to react, such as waking up avoidance or pathing code.

Overridden from UNavMovementComponent

Name Description

Public function Virtual

void

 

RequestPathMove

(
    const FVector& MoveInput
)

UNavMovementComponent override for input operations.

Overridden from UMovementComponent

Name Description

Public function Virtual

void

 

OnTeleported()

Called by owning Actor upon successful teleport from AActor::TeleportTo().

Public function Virtual

void

 

SetUpdatedComponent

(
    USceneComponent* NewUpdatedCom...
)

Overridden to only allow registration with components owned by a Pawn.

Overridden from UObject

Name Description

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Deprecated Functions

Name Description

Public function Const

FVector

 

K2_GetInputVector()

GetInputVector() has been deprecated, use either GetPendingInputVector() or GetLastInputVector().

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss