FSavedMove_Character

[FSavedMove_Character](API\Runtime\Engine\GameFramework\FSavedMove_Character) represents a saved move on the client that has been sent to the server and might need to be played back.

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "GameFramework/CharacterMovementComponent.h"

Syntax

class FSavedMove_Character

Remarks

FSavedMove_Character represents a saved move on the client that has been sent to the server and might need to be played back.

Variables

Name Description

Public variable

float

 

AccelDotThreshold

Threshold for deciding this is an "important" move based on DP with last acked acceleration.

Public variable

float

 

AccelDotThresholdCombine

Threshold for deciding if we can combine two moves, true if cosine of angle between them is <= this.

Public variable

FVector

 

Acceleration

Public variable

float

 

AccelMag

Public variable

float

 

AccelMagThreshold

Threshold for deciding is this is an important move because acceleration magnitude has changed too much

Public variable

FVector

 

AccelNormal

Cached to speed up iteration over IsImportantMove().

Public variable

uint32: 1

 

bForceMaxAccel

Public variable

uint32: 1

 

bForceNoCombine

If true, can't combine this move with another move.

Public variable

uint32: 1

 

bOldTimeStampBeforeReset

If true this move is using an old TimeStamp, before a reset occurred.

Public variable

uint32: 1

 

bPressedJump

Public variable

uint32: 1

 

bWantsToCrouch

Public variable

uint32: 1

 

bWasJumping

Public variable

ACharacter *...

 

CharacterOwner

Public variable

float

 

CustomTimeDilation

Public variable

float

 

DeltaTime

Public variable

uint32

 

EndActorOverlapCounter

Public variable

TWeakObjectPtr<...

 

EndAttachParent

Public variable

FVector

 

EndAttachRelativeLocation

Public variable

FRotator

 

EndAttachRelativeRotation

Public variable

FName

 

EndAttachSocketName

Public variable

TWeakObjectPtr<...

 

EndBase

Public variable

FName

 

EndBoneName

Public variable

uint32

 

EndComponentOverlapCounter

Public variable

uint8

 

EndPackedMovementMode

Information after the move has been performed.

Public variable

int32

 

JumpCurrentCount

Public variable

float

 

JumpForceTimeRemaining

Public variable

float

 

JumpKeyHoldTime

Public variable

int32

 

JumpMaxCount

Public variable

float

 

MaxSpeed

Public variable

float

 

MaxSpeedThresholdCombine

Client saved moves will not combine if the result of GetMaxSpeed() differs by this much between moves.

Public variable

uint8

 

MovementMode

Public variable

TWeakObjectPtr<...

 

RootMotionMontage

Public variable

FRootMotionMove...

 

RootMotionMovement

Public variable

float

 

RootMotionTrackPosition

Public variable

FRotator

 

SavedControlRotation

Public variable

FVector

 

SavedLocation

Public variable

FVector

 

SavedRelativeLocation

Public variable

FRootMotionSour...

 

SavedRootMotion

Public variable

FRotator

 

SavedRotation

Public variable

FVector

 

SavedVelocity

Public variable

uint32

 

StartActorOverlapCounter

Public variable

TWeakObjectPtr<...

 

StartAttachParent

Public variable

FVector

 

StartAttachRelativeLocation

Public variable

FRotator

 

StartAttachRelativeRotation

Public variable

FName

 

StartAttachSocketName

Public variable

TWeakObjectPtr<...

 

StartBase

Public variable

FQuat

 

StartBaseRotation

Public variable

FName

 

StartBoneName

Public variable

float

 

StartCapsuleHalfHeight

Public variable

float

 

StartCapsuleRadius

Public variable

uint32

 

StartComponentOverlapCounter

Public variable

FRotator

 

StartControlRotation

Public variable

FFindFloorResul...

 

StartFloor

Public variable

FVector

 

StartLocation

Public variable

uint8

 

StartPackedMovementMode

Information at the start of the move.

Public variable

FVector

 

StartRelativeLocation

Public variable

FRotator

 

StartRotation

Public variable

FVector

 

StartVelocity

Public variable

float

 

TimeStamp

Constructors

Name Description

Public function

FSavedMove_Character()

Public function

FSavedMove_Character

(
    const FSavedMove_Character&
)

UE_DEPRECATED_FORGAME(4.20)

Public function

FSavedMove_Character

(
    FSavedMove_Character&&
)

Destructors

Name Description

Public function Virtual

~FSavedMove_Character()

Functions

Name Description

Public function Virtual Const

bool

 

CanCombineWith

(
    const FSavedMovePtr& NewMove,
    ACharacter* InCharacter,
    float MaxDelta
)

Returns true if this move can be combined with NewMove for replication without changing any behavior

Public function Virtual

void

 

Clear()

Clear saved move properties, so it can be re-used.

Public function Virtual

void

 

CombineWith

(
    const FSavedMove_Character* Ol...,
    ACharacter* InCharacter,
    APlayerController* PC,
    const FVector& OldStartLocation
)

Combine this move with an older move and update relevant state.

Public function Virtual Const

uint8

 

GetCompressedFlags()

Returns a byte containing encoded special movement information (jumping, crouching, etc.)

Public function Virtual Const

void

 

GetPackedAngles

(
    uint32& YawAndPitchPack,
    uint8& RollPack
)

Packs control rotation for network transport

Public function Virtual Const

FVector

 

GetRevertedLocation()

Returns starting position if we were to revert the move, either absolute StartLocation, or StartRelativeLocation offset from MovementBase's current location (since we want to try to move forward at this time).

Public function Virtual Const

bool

 

IsImportantMove

(
    const FSavedMovePtr& LastAckedMove
)

Returns true if this move is an "important" move that should be sent again if not acked by the server

Public function Virtual Const

bool

 

IsMatchingStartControlRotation

(
    const APlayerController* PC
)

Compare current control rotation with stored starting data

Public function Virtual

void

 

PostUpdate

(
    ACharacter* C,
    EPostUpdateMode PostUpdateMode
)

Set the properties describing the final position, etc. of the moved pawn.

Public function Virtual

void

 

PrepMoveFor

(
    ACharacter* C
)

Called before ClientUpdatePosition uses this SavedMove to make a predictive correction

Public function Virtual

void

 

SetInitialPosition

(
    ACharacter* C
)

Set the properties describing the position, etc. of the moved pawn at the start of the move.

Public function Virtual

void

 

SetMoveFor

(
    ACharacter* C,
    float InDeltaTime,
    FVector const& NewAccel,
    FNetworkPredictionData_Client_Chara...
)

Called to set up this saved move (when initially created) to make a predictive correction.

Operators

Name Description

Public function

FSavedMove_C...

 

operator=

(
    const FSavedMove_Character&
)

Public function

FSavedMove_C...

 

operator=

(
    FSavedMove_Character&&
)

Enums

Name

Description

Public enum

CompressedFlags

Bit masks used by GetCompressedFlags() to encode movement information.

Public enum

EPostUpdateMode

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