Skip to main content
Version: 0.1.0

NetworkTransform

The NetworkTransform component synchronizes the position, rotation, and scale of game objects across the network.

Component Types​

NetworkTransform provides two types:

  • NetworkTransformReliable: High bandwidth, normal latency.
  • NetworkTransformUnreliable: Low bandwidth, very low latency.
note

It is recommended to use NetworkTransformReliable unless you specifically need very low latency.

Basic Setup​

To use the NetworkTransform component, the NetworkIdentity component is required.

Synchronization Settings​

You can control how the game object’s transform is synchronized by setting the following options in the Inspector.

Selective Sync​

Choose which transform properties of the game object to synchronize over the network.

  • Sync Position
    • true: The game object’s position is synchronized over the network.
    • false: Position synchronization is disabled, and local position changes will not be sent to other clients.
  • Sync Rotation
    • true: The game object’s rotation is synchronized over the network.
    • false: Rotation synchronization is disabled, and local rotation changes will not be sent to other clients.
  • Sync Scale
    • true: The game object’s scale is synchronized over the network.
    • false: Scale synchronization is disabled, and local scale changes will not be sent to other clients.

Interpolation​

Controls smooth transitions between received transform values.

  • Interpolate Position
    • true: Position changes are smoothly interpolated.
    • false: Position changes are applied instantly.
  • Interpolate Rotation
    • true: Rotation changes are smoothly interpolated.
    • false: Rotation changes are applied instantly.
  • Interpolate Scale
    • true: Scale changes are smoothly interpolated.
    • false: Scale changes are applied instantly.
note
  • It is advisable not to change Selective Sync settings during runtime.
  • Generally, sync Position and Rotation, and only enable Scale when necessary.
  • For smooth movement, it is recommended to enable Interpolation for both Position and Rotation.

Coordinate Space​

Set the coordinate system for transform synchronization.

  • Local

    • Uses a relative coordinate system based on the parent object.
    • Useful when the object is a child of another object.
    • The synchronization happens relative to the parent’s movement.
  • World

    • Uses absolute positions based on the world coordinate system.
    • Suitable for independent objects that move on their own.
    • They are synchronized in absolute positions, regardless of any parent object.