Network Transform
NetworkTransform is a plug-and-play component that automatically synchronises position, rotation, scale, and parent across all clients. Attach it to any GameObject with a NetworkIdentity.
Setup
Add the NetworkTransform component to a GameObject that already has a NetworkIdentity or NetworkBehaviour. No code required for basic usage.
The component automatically detects authority: if Owner Authis enabled, the owner's position is broadcast to everyone else. If disabled, only the server can push position updates.
Inspector settings
| Parameter | Type | Default | Description |
|---|---|---|---|
Sync Position | bool | true | Synchronise the transform's world position across all clients. |
Sync Rotation | bool | true | Synchronise the transform's rotation (Quaternion). |
Sync Scale | bool | false | Synchronise the transform's local scale. Only enable if scale actually changes at runtime. |
Sync Parent | bool | false | Synchronise parent changes. Enable for pick-up mechanics or vehicle boarding. |
Owner Auth | bool | true | When true, the owner sends position updates. When false, the server is the sole authority. |
Interpolate | bool | true | Smooth movement between received snapshots on remote clients. Disable for teleportation. |
Send Interval (ticks) | int | 1 | How many ticks between position broadcasts. Higher = lower bandwidth, choppier movement. |
Position Tolerance | float | 0.001 | Minimum position delta before a sync is sent. Prevents micro-updates when standing still. |
Rotation Tolerance | float | 0.01 | Minimum angle change (degrees) before a rotation sync is sent. |
Interpolation explained
Without interpolation, remote clients "snap" to new positions whenever a packet arrives — creating choppy, teleporting movement. With interpolation enabled, the component smoothly moves the object between the last received position and the newly received one over the expected tick interval, hiding network jitter.
The dashed outline in the visualizer above shows the true authority position. The solid character on the remote side shows the interpolated position — lagging behind but smoothly tracking.
Teleportation (disabling interpolation temporarily)
using PurrNet;
using UnityEngine;
public class TeleportSystem : NetworkBehaviour
{
[SerializeField] private NetworkTransform netTransform;
// Server teleports the player to a specific position
[ObserversRpc(runLocally: true)]
public void RpcTeleport(Vector3 destination)
{
// Disable interpolation so the client snaps immediately
netTransform.interpolate = false;
transform.position = destination;
// Re-enable interpolation next frame for smooth subsequent movement
StartCoroutine(ReenableInterpolation());
}
private System.Collections.IEnumerator ReenableInterpolation()
{
yield return null;
netTransform.interpolate = true;
}
}Situational example — Vehicle boarding
When a player boards a vehicle, you need to sync both the vehicle position AND reparent the player to the vehicle. Enable Sync Parenton the player's NetworkTransform.
public class VehicleController : NetworkBehaviour
{
[SerializeField] private Transform driverSeat;
[SerializeField] private NetworkTransform playerNetTransform;
[ServerRpc(requireOwnership: false)]
public void CmdBoard(NetworkIdentity playerIdentity, RPCInfo info = default)
{
if (!info.asServer) return;
// Give vehicle ownership to the boarding player
GiveOwnership(info.sender);
// Parent the player to the vehicle seat
// NetworkTransform with SyncParent=true will sync this reparenting
playerIdentity.transform.SetParent(driverSeat);
playerIdentity.transform.localPosition = Vector3.zero;
}
[ServerRpc(requireOwnership: true)]
public void CmdExit(NetworkIdentity playerIdentity)
{
playerIdentity.transform.SetParent(null); // detach
GiveOwnership(null); // remove vehicle owner
}
}Don't override transform directly on remote clients
transform.position directly on a non-authority client will be overwritten by the next NetworkTransform sync. Only modify position on the authority (owner or server). Use if (isOwner) or if (isServer) guards.Bandwidth optimization