class

FCharacterPrediction

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

Properties

TypeNameDescription
static constexpr uint16_tkInputSprintReplicationInputBody::buttonMask bits the step understands. Default 1 << 0.
static constexpr uint16_tkInputCrouchDefault 1 << 1.
static constexpr uint16_tkInputJumpDefault 1 << 2.
static constexpr uint16_tkInputJumpHeldThe jump button's level (variable-height jumps), beside the edge above. Default 1 << 3.
static constexpr floatkPredictionGravityGravity used by the predicted integration — matches CharacterControllerComponent's default (-9.81 m/s²). The full model reads cc.gravity; prediction has no controller so it uses the default. Default -9.81f.

Public functions

ReturnsNameDescription
Vec3StepVelocityThe shared velocity half of one input step: planar velocity at walkSpeed × sprint/crouch (air-controlled when airborne), jump raising vertical velocity when grounded.
voidStepOne deterministic move step through the Walking model: planar velocity at walkSpeed × sprint/crouch (air-controlled when airborne), jump sets vertical velocity, gravity integrates it, position advances, and a flat-ground clamp re-grounds on landing.
voidReconcileSnap to the server's authoritative position + move state, then replay every pending input with clientTick > ackTick through Step.

Function details

StepVelocity

C++
static Vec3 StepVelocity(const Vec3& current, bool grounded, const CharacterMovementComponent& mm, const ReplicationInputBody& input, float dt, bool* outJumped)

The shared velocity half of one input step: planar velocity at walkSpeed × sprint/crouch (air-controlled when airborne), jump raising vertical velocity when grounded. Step integrates it against the flat plane; FCharacterNetDriver's replay integrates it through the REAL Jolt character step instead — both intents come from here so the two paths agree on what an input means.

Step

C++
static void Step(TransformComponent& tc, FMoveState& state, const CharacterMovementComponent& mm, const ReplicationInputBody& input, float dt)

One deterministic move step through the Walking model: planar velocity at walkSpeed × sprint/crouch (air-controlled when airborne), jump sets vertical velocity, gravity integrates it, position advances, and a flat-ground clamp re-grounds on landing.

Reconcile

C++
static void Reconcile(TransformComponent& tc, FMoveState& state, const CharacterMovementComponent& mm, const Vec3& authoritativePos, const FMoveState& authoritativeState, uint32_t ackTick, const std::vector<FPendingInput>& pending, float dt)

Snap to the server's authoritative position + move state, then replay every pending input with clientTick > ackTick through Step.

Generated from Networking/Replication/CharacterPrediction.h via networking.json · Nov 4, 2026Version 1.0.0