<aside> 🧭
Navigation
</aside>
This documentation is structured as a technical reference guide to help you understand, configure, and integrate the SmoothNetworkSync API into your Unreal Engine projects.
SmoothNetworkSync replicates an actor’s transform smoothly and with little bandwidth, through a single component: Smooth Sync (USmoothSyncComponent).
Replicate Movement: no more jitter, rubber-banding, sliding teleports or objects overshooting when they stop.SmoothNetworkSync (runtime, the only one your game needs), SmoothNetworkSyncExamples (demo actors for the example map), SmoothNetworkSyncTests (editor-only automated tests).UNetworkInterpolatorComponent was renamed USmoothSyncComponent. Existing assets are redirected automatically; update your C++ includes to Components/SmoothSyncComponent.h and Interfaces/SmoothSyncable.h."SmoothNetworkSync" to PublicDependencyModuleNames in your .Build.cs.Net.IsPushModelEnabled=1 (DefaultEngine.ini, [SystemSettings]).bReplicates = true) and its root is Movable.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.
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.
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).
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.
| 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.
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.
Physics objects pushed by players
Physics Object (shows the copy in the present near the local player, so the player collides with it at the right place).Mesh->SetSimulatePhysics(HasAuthority())); client copies stay kinematic.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.
USmoothSyncComponent (Smooth Sync)The central component to add to any replicated actor that needs smooth synchronization.
Picking a preset fills the related settings. Editing one of them afterwards switches the preset back to Custom.
| --- | --- | --- | --- | --- | --- |
| --- | --- | --- | --- |
Soft correction of a server-authoritative pawn toward the server’s position on its owning client.
| --- | --- | --- |
USmoothSyncCharacterMovementComponentOptional CharacterMovementComponent for server-authoritative players that push physics objects.
| --- | --- | --- |
| --- | --- | --- |
| --- | --- |
| --- | --- | --- |
ISmoothSyncable InterfaceBy 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.