Mirror
Setup guide for Dynamic Water Physics 2 multiplayer using Mirror framework.
The guide shows how to set up AdvancedShipController for multiplayer.
If setting up just a simple WaterObject use the NetworkRigidbody as
the WaterObjects are just simple Rigidbodies and do not need any
advanced synchronization.
Mirror demo scene is included with the asset.
Warning: Make sure that the scene contains required InputProviders for the input system that is being used. More about Input here.
Setting up the scene
- Create a new GameObject called 'NetworkManager'.
- Add the following components to the created object:
- NetworkManager
- NetworkManagerHUD
- TelepathyTransport (or other transport if you are not using Telepathy). In newer versions of Mirror KcpTransport is the default.
Warning: The scene should contain required InputProviders for the input system that is being used. More about Input here.
Setting up the vehicle
- Double click on Mirror.unitypackage (NWH\Dynamic Water Physics 2\OptionalPackages\Multiplayer) to import the required assets.
- Add MirrorMultiplayerShip component to the ship. This will also add necessary Mirror components automatically.
- Make sure that NetworkTransform's and NetworkRigidbody's Client
Authority fields are ticked.
- Set Network Sync Interval to 0.05 (20Hz). Default value is 0.1 (10Hz) and is too low for physics objects and will result in stuttering.
- Set Compress Rotation to None.
- Save the vehicle as a prefab and assign it to
NetworkManager's Player Prefab field.