class

FPhysicsBodyReplication

Per-body replication state: a bandwidth-lean wire format with delta against a baseline the receiver already holds, and the client-side correction that pulls a predicted body onto the authoritative one. The server replicates the bodies it owns; the owner-predicted ones are reconciled, not overwritten.

Module
Physics
Header
#include "Physics/PhysicsSnapshot.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
FPhysicsBodyStateQuantizeWhat a state looks like after one trip through the wire's fixed point (1 mm, 0.01 m/s, 16-bit orientation components) — compare a received state against this, never against the unquantised original.
voidEncodeWrites every state, each field only when it differs from the same-key baseline entry; a key with no baseline entry carries all fields.
boolDecodeRebuilds the states a packet carried, applying each onto its baseline entry.
floatReconcileMoves local toward authoritative and returns the position error it started from.

Function details

Quantize

C++
static FPhysicsBodyState Quantize(const FPhysicsBodyState& state)

What a state looks like after one trip through the wire's fixed point (1 mm, 0.01 m/s, 16-bit orientation components) — compare a received state against this, never against the unquantised original.

Encode

C++
static void Encode(const std::vector<FPhysicsBodyState>& states, const std::vector<FPhysicsBodyState>* baseline, std::vector<uint8_t>& out)

Writes every state, each field only when it differs from the same-key baseline entry; a key with no baseline entry carries all fields.

Decode

C++
static bool Decode(const std::vector<uint8_t>& packet, const std::vector<FPhysicsBodyState>* baseline, std::vector<FPhysicsBodyState>& out)

Rebuilds the states a packet carried, applying each onto its baseline entry. False on a truncated or malformed packet; out is then unspecified.

Reconcile

C++
static float Reconcile(const FPhysicsBodyState& local, const FPhysicsBodyState& authoritative, const FPhysicsReconcileSettings& settings, FPhysicsBodyState& corrected, bool& snapped)

Moves local toward authoritative and returns the position error it started from. snapped is set when the thresholds sent it straight there.

Generated from Physics/PhysicsSnapshot.h via physics.json · Nov 4, 2026Version 1.0.0