From 6de845b5fff5baef32e9ba692a67ba28ccd23254 Mon Sep 17 00:00:00 2001 From: vis2k Date: Thu, 20 Oct 2022 18:47:48 +0200 Subject: [PATCH] fix: make smooth again --- .../Components/NetworkTransform2k/NetworkTransformBase.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Mirror/Components/NetworkTransform2k/NetworkTransformBase.cs b/Assets/Mirror/Components/NetworkTransform2k/NetworkTransformBase.cs index 868a0e800..0daf65a4f 100644 --- a/Assets/Mirror/Components/NetworkTransform2k/NetworkTransformBase.cs +++ b/Assets/Mirror/Components/NetworkTransform2k/NetworkTransformBase.cs @@ -60,6 +60,13 @@ public abstract class NetworkTransformBase : NetworkBehaviour // make sure to call this when inheriting too! protected virtual void Awake() {} + public override void OnStartServer() + { + // force 0 to send every NetworkServer.sendInterval. + // if we use an interval that's much higher, then it's not smooth. + syncInterval = 0; + } + // snapshot functions ////////////////////////////////////////////////// // construct a snapshot of the current state // => internal for testing