Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🏃Networked movement

The player you control should move as soon as you press a direction. The server still decides where that character actually is, and corrects the client when the two disagree. Score and other shared results stay on replicated properties, as on Share state and actions.

Prediction and correction

MovementPawn is the Pawn built for this. It owns a movement node and sends a timestamped transform so other players can see the character move smoothly.

The local client stores recent inputs and simulates them immediately. That client-side history lives on NetMovementPredictor, which MovementPawn and BasePawnMovementNode already use. When the server's result arrives, the client reconciles to it.

Other players' characters are simulated proxies. They follow the server's transform. They do not run the local player's input.

Set up rewind before play starts

NetPredictionManager is how moving objects can be rewound to an earlier moment, so a correction can replay against the platforms and props that were there at that time. It is not created for you.

Call NetPredictionManager.initialize(world) from GameMode.onBeforeBeginPlay, before rewindable nodes begin play. Call NetPredictionManager.shutdown(world) from GameMode.onAfterEndPlay.

public override onBeforeBeginPlay(): void {
  super.onBeforeBeginPlay();
  NetPredictionManager.initialize(this.getWorld()!);
}

public override onAfterEndPlay(): void {
  NetPredictionManager.shutdown(this.getWorld()!);
  super.onAfterEndPlay();
}

Calling initialize again on the same world does not create a second manager.

Use NetPredictionManager.getGameTimeMs(world) for snapshots and timestamps the server and clients share. A local UI clock can keep using local game time.

A dynamic physics prop that should take part in that history subclasses NetRewindablePhysicsProp. It registers itself on begin play, so the manager has to exist first. Register a node when its earlier pose can affect a predicted simulation. Those nodes implement IRewindable. Static level geometry and a cosmetic mesh with no effect on collision stay unregistered.

Practical guidance

Ask the agent to use the movement Pawn for each player, and to start the prediction manager from the GameMode:

When you add a crate, platform, or other physics object that players collide with, ask for NetRewindablePhysicsProp rather than a plain physics mesh.

Common mistakes

Mistake
What to do instead

Turning on replication on an existing single-player movement script

Use MovementPawn and BasePawnMovementNode. They already predict and correct

Initializing NetPredictionManager after props have begun play

Initialize it in onBeforeBeginPlay

Rewinding every mesh in the level

Register props that affect collision. Leave static geometry and cosmetic meshes alone

Treating the local predicted position as the position the rules use

The server correction is the position that gameplay rules use

Checked against @gnsx/genesys.js 19.0.0-beta.456 on 16 October 2026.

Last updated

Was this helpful?