class

FCharacterNetDriver

Character movement over the network, UE CharacterMovement-shaped. The client records a move per send (its input and the time it covers), predicts it locally and sends it with the moves the server has not acknowledged yet. The server queues every move per player and steps the pawn once per move, in order, with that move's time, through the same code the frame runs (CharacterMovementSystem::StepMovement + PhysicsSystem::StepCharacter); the ack names the last move it actually stepped. The client then rewinds to the server's pose, replays what is still unacknowledged, and hides the jump with a decaying visual offset.

Module
Networking
Header
#include "Networking/Replication/CharacterNetDriver.h"
Namespace
Mowo

Type aliases

AliasDescription
using FStepFn = std::function<bool(uint64_t entityId, const ReplicationInputBody& cmd, float dt)>
using FSendFn = std::function<void(const ReplicationInputBody& move)>
using FActorMoveApplyFn = bool (*)(World& world, uint64_t entity, const Vec3& moveDir, bool sprint, bool crouch, bool jump)Actor-path movement apply (E3.1 N2). The driver itself knows only entities; the Game module installs this so server inputs drive the pawn's MCharacterMovementComponent (jump buffering, mode machine) when an actor world exists. Return false to fall through to the raw ECS CharacterMovementComponent path. Plain fn ptr — this crosses a DLL boundary once the driver moves down into Networking.

Constructors

SignatureNameDescription
FCharacterNetDriver() = defaultFCharacterNetDriver
~FCharacterNetDriver() override = default~FCharacterNetDriver

Public functions

ReturnsNameDescription
voidSetActorMoveApplyHook
voidInitialize
voidShutdown
voidUpdate
voidSetStepFunction
voidSetMoveSendFunction
voidSetLocalPawn
uint64_tGetLocalPawn
uint32_tGetReconcileCount
uint32_tGetCorrectionCount
floatGetLastCorrectionError
boolServerApplyInputServer: queue one move from a player.
voidServerConsumeMovesServer: step every queued move of every player whose time the server's clock has covered.
size_tGetQueuedMoveCount
uint32_tGetServerMovesStepped
boolStepPawn
voidRecordPredictedStep
boolClientReconcileAgainst
boolClientReconcileAgainstThe full form: the server's movement state rides along and the replay starts from it (velocity, mode, timers), not from the client's own.
voidClientReconcile
Vec3GetCorrectionOffsetClient: the visual offset still hiding the last correction.
voidClientApplySmoothing
uint16_tBuildButtonMask
uint16_tBuildButtonMask
voidWriteNetMovementStateServer: publish the pawn's movement state into its NetMovementState component (added on first use) after a move.
boolReadNetMovementStateClient: the server's movement state from the replicated shadow, with the fields the snapshot does not carry (root-motion sources) taken from local.
uint16_tEncodeMoveSeconds
floatMoveSeconds
floatQuantizeMoveAxis
floatQuantizeLookAxis
voidQuantizeMove
boolCanCombineMoves
voidClientSubmitMove
voidClientCapturePredictedPose
voidClientFlushHeldMove
boolHasHeldMove
floatGetHeldMoveSeconds
uint32_tGetCombinedMoveCount
uint32_tGetSentMoveCount
size_tGetPredictedStepCount

Function details

FCharacterNetDriver

C++
FCharacterNetDriver() = default

~FCharacterNetDriver

C++
~FCharacterNetDriver() override = default

SetActorMoveApplyHook

C++
static void SetActorMoveApplyHook(FActorMoveApplyFn fn)

Initialize

C++
void Initialize(World* world) override

Shutdown

C++
void Shutdown() override

Update

C++
void Update(float deltaTime) override

SetStepFunction

C++
void SetStepFunction(FStepFn fn)

SetMoveSendFunction

C++
void SetMoveSendFunction(FSendFn fn)

SetLocalPawn

C++
void SetLocalPawn(uint64_t entityId)

GetLocalPawn

C++
uint64_t GetLocalPawn() const

GetReconcileCount

C++
uint32_t GetReconcileCount() const

GetCorrectionCount

C++
uint32_t GetCorrectionCount() const

GetLastCorrectionError

C++
float GetLastCorrectionError() const

ServerApplyInput

C++
bool ServerApplyInput(uint32_t senderPeerId, const ReplicationInputBody& body)

Server: queue one move from a player. False when the peer has no pawn.

ServerConsumeMoves

C++
void ServerConsumeMoves(float deltaTime)

Server: step every queued move of every player whose time the server's clock has covered. Update calls it on a host each frame.

GetQueuedMoveCount

C++
size_t GetQueuedMoveCount(uint32_t peerId) const

GetServerMovesStepped

C++
uint32_t GetServerMovesStepped() const

StepPawn

C++
bool StepPawn(uint64_t entityId, const ReplicationInputBody& cmd, float dt)

RecordPredictedStep

C++
void RecordPredictedStep(uint32_t clientTick, const ReplicationInputBody& cmd, float dt, const Vec3& predictedPosition)

ClientReconcileAgainst

C++
bool ClientReconcileAgainst(const Vec3& authoritativePosition, uint32_t ackTick)

ClientReconcileAgainst

C++
bool ClientReconcileAgainst(const Vec3& authoritativePosition, const FCharacterMoveState* authoritativeState, uint32_t ackTick)

The full form: the server's movement state rides along and the replay starts from it (velocity, mode, timers), not from the client's own.

ClientReconcile

C++
void ClientReconcile(uint32_t ackTick)

GetCorrectionOffset

C++
Vec3 GetCorrectionOffset() const

Client: the visual offset still hiding the last correction.

ClientApplySmoothing

C++
void ClientApplySmoothing(float deltaTime)

BuildButtonMask

C++
static uint16_t BuildButtonMask(bool sprint, bool crouch, bool jump)

BuildButtonMask

C++
static uint16_t BuildButtonMask(bool sprint, bool crouch, bool jump, bool jumpHeld)

WriteNetMovementState

C++
static void WriteNetMovementState(World& world, uint64_t entityId)

Server: publish the pawn's movement state into its NetMovementState component (added on first use) after a move.

ReadNetMovementState

C++
static bool ReadNetMovementState(const void* shadow, const FCharacterMoveState& local, FCharacterMoveState& out)

Client: the server's movement state from the replicated shadow, with the fields the snapshot does not carry (root-motion sources) taken from local. False when nothing has arrived yet.

EncodeMoveSeconds

C++
static uint16_t EncodeMoveSeconds(float seconds)

MoveSeconds

C++
static float MoveSeconds(const ReplicationInputBody& move)

QuantizeMoveAxis

C++
static float QuantizeMoveAxis(float value)

QuantizeLookAxis

C++
static float QuantizeLookAxis(float value)

QuantizeMove

C++
static void QuantizeMove(ReplicationInputBody& move)

CanCombineMoves

C++
static bool CanCombineMoves(const ReplicationInputBody& held, const ReplicationInputBody& next, float combinedSeconds)

ClientSubmitMove

C++
void ClientSubmitMove(const ReplicationInputBody& move, float dt, const FCharacterMoveState& state, bool combinable)

ClientCapturePredictedPose

C++
void ClientCapturePredictedPose(const Vec3& position, const FCharacterMoveState& state)

ClientFlushHeldMove

C++
void ClientFlushHeldMove()

HasHeldMove

C++
bool HasHeldMove() const

GetHeldMoveSeconds

C++
float GetHeldMoveSeconds() const

GetCombinedMoveCount

C++
uint32_t GetCombinedMoveCount() const

GetSentMoveCount

C++
uint32_t GetSentMoveCount() const

GetPredictedStepCount

C++
size_t GetPredictedStepCount() const
Generated from Networking/Replication/CharacterNetDriver.h via networking.json · Nov 4, 2026Version 1.0.0