FFixedTickState

(Global) Tick state for fixed tick services

Windows
MacOS
Linux

References

Module

NetworkPrediction

Header

/Engine/Plugins/Runtime/NetworkPrediction/Source/NetworkPrediction/Public/NetworkPredictionTickState.h

Include

#include "NetworkPredictionTickState.h"

Syntax

struct FFixedTickState

Remarks

(Global) Tick state for fixed tick services

Notes about Fix Ticking in NetworkPrediction: 1, This is the only mode that supports physics rewind/resim.

For now, this requires the engine to run in a fixed step mode on both server and clients a. GEngine->bUseFixedFrameRate / GEngine->FixedFrameRate

If you aren't using Physics, FixedTick mode will accumulate real time and run 0-N Sim frames per engine frame.

If you are using Physics, FixedTick will always run 1 sim frame per engine frame to stay in sync with physics. a. Since NP uses int32 ms and the engine will use float DeltaTimeSeconds, NP will slowly lose time compared to the rest of the engine/physics

The long term goal is supporting fixed physics steps without engine fix ticking. There is no guarantee or timeline this will happen though.

Variables

Name Description

Public variable

int32

 

ConfirmedFrame

Latest confirmed local frame number. Anything at or before this frame is "set in stone".

Public variable

int32

 

FixedStepMS

FixedStepMS that simulations should use.

Public variable

float

 

FixedStepRealTimeMS

Realtime steps.

Public variable

FInterpolationS...

 

Interpolation

Public variable

int32

 

Offset

Maps ForwardPredicted authority frames to local frame.

Public variable

int32

 

PendingFrame

Next frame to be ticked (used as input to generated PendingFrame+1)

Public variable

int32

 

PhysicsOffset

Maps PendingFrame to PhysicsRewindData()->CurrentFrame().

Public variable

Chaos::FRewindD...

 

PhysicsRewindData

Public variable

float

 

UnspentTimeMS

Accumulates raw delta time into our fixed steps,.

Functions

Classes

Name

Description

Public struct

FInterpolationState

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