<aside> 🧭

Navigation

Smooth Network Sync

</aside>

🌐 Technical Documentation: SmoothNetworkSync

This documentation is structured as a technical reference guide to help you understand, configure, and integrate the SmoothNetworkSync API into your Unreal Engine projects.


📖 General

Introduction

SmoothNetworkSync replicates an actor’s transform smoothly and with little bandwidth, through a single component: Smooth Sync (USmoothSyncComponent).

Core Concepts

Requirements


🚀 Implementation

Project Setup

  1. Enable the SmoothNetworkSync plugin in the editor.
  2. C++ projects: add "SmoothNetworkSync" to PublicDependencyModuleNames in your .Build.cs.
  3. Recommended: enable push-model replication with Net.IsPushModelEnabled=1 (DefaultEngine.ini, [SystemSettings]).

Quick Start (props, physics objects, vehicles)

  1. Make sure the actor replicates (Replicates checked, or bReplicates = true) and its root is Movable.
  2. Add the Smooth Sync component.
  3. Pick a Preset: Prop, Physics Object or Vehicle.

That’s it: the component turns off Replicate Movement on regular actors, and a world subsystem updates every component in a single loop (components have no tick of their own). Setup mistakes are reported in the Output Log (LogSmoothSync) and through Data Validation.

#include"Components/SmoothSyncComponent.h"

AMyProp::AMyProp()
{
    bReplicates = true;

    SmoothSync = CreateDefaultSubobject<USmoothSyncComponent>(TEXT("SmoothSync"));
    SmoothSync->ApplyPreset(ESmoothSyncPreset::Prop);
}

The example map Content/Examples/Maps/MapTest_SmoothSync shows every case; play it with Net Mode: Play As Client.

Characters (players)

Add Smooth Sync to your Character like any other actor.

Who Handled by
The owning player’s own character The CMC’s client prediction (unchanged).
The server The CMC simulates the moves and pushes physics props (unchanged).
Other players’ characters, on each client Smooth Sync: adaptive interpolation instead of the CMC’s smoothing. The CMC velocity is fed with the smoothed one, so animation blueprints keep working.
Remote players seen by a listen server host Smooth Sync: the collision follows the received moves, the visuals (the root’s children) follow them smoothly.

Replicate Movement must stay ON for Characters: the CMC only sends the owning client’s moves to the server while it is on. The component turns it back on if needed.

Keep gameplay code in sync with what is drawn

When an engine movement update arrives, a remote copy is placed where the server is now, at the start of the frame. Smooth Sync moves it back to its interpolated (slightly past) position at the end of the frame, so everything ticking in between (traces, overlaps, hit checks) would see the copy tens of centimetres away from where it is drawn. Put it back right after the engine’s update while Smooth Sync drives it:

void AMyCharacter::PostNetReceiveLocationAndRotation()
{
    const bool bKeep = SmoothSync && SmoothSync->IsDrivingRemoteCopy();
    const FTransform Displayed = GetActorTransform();
    Super::PostNetReceiveLocationAndRotation();
    if (bKeep)
        SetActorTransform(Displayed, false, nullptr, ETeleportType::TeleportPhysics);
}

// Same pattern for OnRep_ReplicatedBasedMovement (characters standing on a movable base).

Hit validation

Remote copies are shown up to GetMaxDisplayDelay() seconds in the past (largest interpolation delay plus one snapshot interval), on top of the network delay. A server checking hits against the target’s current position should widen its tolerance (or rewind) by the shooter’s ping + GetMaxDisplayDelay() of the target.

Server-authoritative or client-authoritative?

Mode Owner’s experience Cheating When
Server-authoritative (default) The server corrects the player when positions differ. Smooth Sync hides corrections, and USmoothSyncCharacterMovementComponent avoids most of them when touching physics props. Protected Competitive games
Client-authoritative (Is Client Authoritative) Never corrected: the server still simulates the moves (props get pushed), then accepts the player’s position. Max Client Move Speed is checked every 0.25 s; on violation the server takes over and corrects the player for one second. Co-op, physics-heavy games

In client-authoritative mode, also turn on the engine’s time discrepancy detection (Config/DefaultGame.ini), otherwise a cheater can speed up the move clock itself:

[/Script/Engine.GameNetworkManager]
bMovementTimeDiscrepancyDetection=true
bMovementTimeDiscrepancyResolution=true
bMovementTimeDiscrepancyForceCorrectionsDuringResolution=true

Respawns in client-authoritative mode: move the player on the server and call NotifyTeleported(). The server stops trusting the client for one second, so the client is corrected to the new position instead of overriding it.

Smooth corrections for server-authoritative players

  1. Hide corrections (Smooth Owner Corrections, on by default): the collision snaps right away, but the visuals slide back over Owner Correction Smoothing Time (0.15 s). Corrections larger than Max Owner Correction Smoothing Distance (200) still snap.
  2. Avoid corrections near physics objects: use USmoothSyncCharacterMovementComponent. While the character touches a simulating body, it tolerates Physics Contact Error Tolerance (50 units) and keeps the client’s position.
AMyCharacter::AMyCharacter(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer.SetDefaultSubobjectClass<USmoothSyncCharacterMovementComponent>(ACharacter::CharacterMovementComponentName))
{
}

Bandwidth note: Characters keep the engine’s movement replication (needed by the CMC) on top of Smooth Sync’s snapshots.

Common Setups

Physics objects pushed by players

  1. Preset Physics Object (shows the copy in the present near the local player, so the player collides with it at the right place).
  2. Simulate physics on the server only (Mesh->SetSimulatePhysics(HasAuthority())); client copies stay kinematic.
  3. Keep the copy blocking the Pawn channel on clients.
  4. Give the body some linear and angular damping (Chaos has no rolling resistance).
  5. For light props, enable Push Force Scaled To Mass on the CMC and lower Push Force Factor (3000 to 6000).

Many props in a level: enable Use Dormancy When At Rest. After Dormancy Delay, a resting actor stops replicating entirely until it moves again. Only for actors whose other replicated properties don’t change while resting. Never used on Characters or player pawns.

Player vehicle with local physics: preset Vehicle, check Is Client Authoritative, set Max Client Move Speed above the top speed, and implement ISmoothSyncable if the vehicle applies the transform itself.

Server-authoritative pawn (not a Character): leave Is Client Authoritative off and send your input to the server yourself. The owning client is softly pulled toward the server position (Owner Correction settings).

Teleports and respawns: call NotifyTeleported() right after moving the actor, on the machine that moved it, and clients snap instead of sliding. Jumps far beyond the expected travel (Teleport Distance Threshold, in world units) also snap.

Objects on moving parents: an actor whose root is attached to a moving component, or a Character standing on a moving platform, is synced relative to it (Sync Relative To Parent, on by default). The platform must be replicated and moved by gameplay code.

Floors that never move should have Static mobility: a Movable floor is treated as a moving platform, and every snapshot then carries a reference to it.

Cargo (physics objects carried by a vehicle): on the server, call SetSyncBase(VehicleComponent) while the object is in the vehicle (e.g. from a cargo volume overlap) and SetSyncBase(nullptr) when it leaves. Every client, the driver included, then shows the cargo in its place.

Scale: check Sync Scale to replicate and interpolate the 3D scale.


🧱 Objects and Components

The USmoothSyncComponent (Smooth Sync)

The central component to add to any replicated actor that needs smooth synchronization.

Presets

Picking a preset fills the related settings. Editing one of them afterwards switches the preset back to Custom.

| --- | --- | --- | --- | --- | --- |

Properties and Configuration

| --- | --- | --- | --- |

Autonomous Proxy Prediction (non-Character pawns, advanced)

Soft correction of a server-authoritative pawn toward the server’s position on its owning client.

| --- | --- | --- |

The USmoothSyncCharacterMovementComponent

Optional CharacterMovementComponent for server-authoritative players that push physics objects.

| --- | --- | --- |


🔌 API and Interfaces

Functions

| --- | --- | --- |

Events

| --- | --- |


⚠️ Troubleshooting and Common Errors

| --- | --- | --- |

ISmoothSyncable Interface

By default the component calls SetActorTransform (and sets the physics velocities when the root simulates). Implement Smooth Syncable on the actor to apply the transform yourself: move only a visual mesh, feed an animation, or drive physics your own way.