> For the complete documentation index, see [llms.txt](https://studio-docs.sandbox.game/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://studio-docs.sandbox.game/multiplayer/networked-movement.md).

# 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](https://studio-docs.sandbox.game/multiplayer/share-state-and-actions.md).

## 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`.

```typescript
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`:

```
Use MovementPawn and the supported movement node for each player. Initialize NetPredictionManager in GameMode.onBeforeBeginPlay and shut it down in onAfterEndPlay. Do not add a separate single-player movement script.
```

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.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://studio-docs.sandbox.game/multiplayer/networked-movement.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
