NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Photon Multiplayer Vehicle

    Networks vehicles via Photon Unity Networking 2, for both dedicated server and host+client setups. Physics simulation runs on the PhotonView owner.

    Setup

    Requires components:

    • PhotonView
    • PhotonRigidbodyView
    • PhotonTransformView
    • VehicleController

    All automatically synchronized over network.

    Properties

    • sendRate (int, default 12) - Photon send rate (Hz)
    • serializationRate (int, default 12) - Photon serialization rate (Hz)

    Synchronized State

    The following vehicle state is replicated:

    • Input: steering, throttle, clutch, handbrake
    • Shift commands: shiftInto, shiftUp, shiftDown
    • Engine: engineStartStop, engineAngularVelocity
    • Actions: horn, trailerAttachDetach, cruiseControl, boost, flipOver
    • Lighting: lightState

    Remote clients receive validated input values (clamped to safe ranges).

    See Also

    Photon Unity Networking 2 setup guide

    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics