FNetworkPredictionData_Client_Character

Windows
MacOS
Linux

Inheritance Hierarchy

FNetworkPredictionData_Client

FNoncopyable

FNetworkPredictionData_Client_Character

References

Module

Engine

Header

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

Include

#include "GameFramework/CharacterMovementComponent.h"

Syntax

class FNetworkPredictionData_Client_Character :
    public FNetworkPredictionData_Client ,
    protected FNoncopyable

Variables

Name Description

Public variable

uint32 : 1

 

bUpdatePosition

Public variable

float

 

ClientUpdateTime

Client timestamp of last time it sent a servermove() to the server.

Public variable

float

 

CurrentTimeStamp

Current TimeStamp for sending new Moves to the Server.

Public variable

float

 

DebugForcedPacketLossTimerStart

Used for simulated packet loss in development builds.

Public variable

TArray < FSavedM ...

 

FreeMoves

Public variable

FSavedMovePtr

 

LastAckedMove

Public variable

float

 

LastCorrectionDelta

Used for remembering how much time has passed between server corrections

Public variable

float

 

LastCorrectionTime

Used to track time of last correction

Public variable

float

 

LastReceivedAckRealTime

Last World timestamp (undilated, real time) at which we received a server ack for a move.

Public variable

FVector

 

LastServerLocation

Public variable

FVector

 

LastSmoothLocation

Values used for visualization and debugging of simulated net corrections

Public variable

float

 

MaxClientSmoothingDeltaTime

Max time delta between server updates over which client smoothing is allowed to interpolate.

Public variable

int32

 

MaxFreeMoveCount

Public variable

float

 

MaxMoveDeltaTime

Max delta time for a given move, in real seconds Based off of AGameNetworkManager::MaxMoveDeltaTime config setting, but can be modified per actor if needed.

Public variable

int32

 

MaxSavedMoveCount

Public variable

float

 

MaxSmoothNetUpdateDist

Copied value from [UCharacterMovementComponent::NetworkMaxSmoothUpdateDistance](API\Runtime\Engine\GameFramework\UCharacterMovementComponent\NetworkMaxSmooth-).

Public variable

FQuat

 

MeshRotationOffset

Component space offset of the mesh. Used for rotation smoothing in net games.

Public variable

FQuat

 

MeshRotationTarget

Target for mesh rotation interpolation.

Public variable

FVector

 

MeshTranslationOffset

World space offset of the mesh.

Public variable

float

 

NoSmoothNetUpdateDist

Copied value from [UCharacterMovementComponent::NetworkNoSmoothUpdateDistance](API\Runtime\Engine\GameFramework\UCharacterMovementComponent\NetworkNoSmoothU-).

Public variable

FQuat

 

OriginalMeshRotationOffset

Used for rotation smoothing in net games (only used by linear smoothing).

Public variable

FVector

 

OriginalMeshTranslationOffset

Used for position smoothing in net games

Public variable

FSavedMovePtr

 

PendingMove

Public variable

TArray < FCharac ...

 

ReplaySamples

Array of replay samples that we use to interpolate between to get smooth location/rotation/velocity/ect

Public variable

FRootMotionMove ...

 

RootMotionMovement

RootMotion saved while animation is updated, so we can store it and replay if needed in case of a position correction.

Public variable

TArray < FSavedM ...

 

SavedMoves

Public variable

float

 

SimulatedDebugDrawTime

Public variable

double

 

SmoothingClientTimeStamp

Used to track the client time as we try to match the server.

Public variable

double

 

SmoothingServerTimeStamp

Used to track the timestamp of the last server move.

Public variable

float

 

SmoothNetUpdateRotationTime

How long to take to smoothly interpolate from the old pawn rotation on the client to the corrected one sent by the server.

Public variable

float

 

SmoothNetUpdateTime

How long to take to smoothly interpolate from the old pawn position on the client to the corrected one sent by the server.

Constructors

Destructors

Functions

Name Description

Public function

void

 

AckMove

(
    int32 AckedMoveIndex,
    UCharacterMovementComponent & Chara...
)

Ack a given move.

Public function Virtual

FSavedMovePt ...

 

AllocateNewMove()

Allocate a new saved move. Subclasses should override this if they want to use a custom move class.

Public function Virtual

FSavedMovePt ...

 

CreateSavedMove()

Tries to pull a pooled move off the free move list, otherwise allocates a new move.

Public function Virtual

void

 

FreeMove

(
    const FSavedMovePtr & Move
)

Return a move to the free move pool.

Public function Const

int32

 

GetSavedMoveIndex

(
    float TimeStamp
)

Finds SavedMove index for given TimeStamp.

Public function

float

 

UpdateTimeStampAndDeltaTime

(
    float DeltaTime,
    ACharacter & CharacterOwner,
    UCharacterMovementComponent & Chara...
)

Update CurentTimeStamp from passed in DeltaTime.

Deprecated Variables

Name Description

Public variable

uint32 : 1

 

bSmoothNetUpdates

bSmoothNetUpdates will be removed, use UCharacterMovementComponent::NetworkSmoothingMode instead.

Public variable

bool

 

bUseLinearSmoothing

bUseLinearSmoothing will be removed, use UCharacterMovementComponent::NetworkSmoothingMode instead.

Public variable

float

 

CurrentSmoothTime

CurrentSmoothTime will be removed, use LastCorrectionTime instead.

Public variable

float

 

MaxResponseTime

MaxResponseTime has been renamed to MaxMoveDeltaTime for clarity in what it does and will be removed, use MaxMoveDeltaTime instead.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback