UFloatingPawnMovement

Inheritance Hierarchy

Syntax

class UFloatingPawnMovement : public UPawnMovementComponent

Remarks

Movement component updates position of associated PrimitiveComponent during its tick FloatingPawnMovement is a movement component that provides simple movement for any Pawn class. Limits on speed and acceleration are provided, while gravity is not implemented.

Normally the root component of the owning actor is moved, however another component may be selected (see SetUpdatedComponent() ). During swept (non-teleporting) movement only collision of UpdatedComponent is considered, attached components will teleport to the end location ignoring collision.

Variables

Name Description

Public variable

float

 

Acceleration

Acceleration applied by input (rate of change of velocity)

Protected variable

uint32 : 1

 

bPositionCorrected

Set to true when a position correction is applied.

Public variable

float

 

Deceleration

Deceleration applied when there is no input (rate of change of velocity)

Public variable

float

 

MaxSpeed

Maximum velocity magnitude allowed for the controlled Pawn.

Public variable

float

 

TurningBoost

Setting affecting extra force applied when changing direction, making turns have less drift and become more responsive.

Constructors

Name Description

Public function

UFloatingPawnMovement

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Protected function Virtual

void

 

ApplyControlInputToVelocity

(
    float DeltaTime
)

Update Velocity based on input. Also applies gravity.

Protected function Virtual

bool

 

LimitWorldBounds()

Prevent Pawn from leaving the world bounds (if that restriction is enabled in WorldSettings)

Overridden from UMovementComponent

Name Description

Public function Virtual Const

float

 

GetMaxSpeed()

Returns maximum speed of component in current movement mode.

Protected function Virtual

bool

 

ResolvePenetrationImpl

(
    const FVector & Adjustment,
    const FHitResult & Hit,
    const FQuat & NewRotation
)

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction * T...
)

Function called every frame on this ActorComponent.

References

Module

Engine

Header

Runtime/Engine/Classes/GameFramework/FloatingPawnMovement.h