From 05af4e9101b36b47bac8f14249783e745618326a Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Wed, 17 Apr 2024 02:29:49 -0400 Subject: [PATCH] chore(NetworkTransform): Additional Settings Headers --- .../Components/NetworkTransform/NetworkTransformReliable.cs | 1 + .../Components/NetworkTransform/NetworkTransformUnreliable.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Assets/Mirror/Components/NetworkTransform/NetworkTransformReliable.cs b/Assets/Mirror/Components/NetworkTransform/NetworkTransformReliable.cs index f6e851bf0..c790e88ce 100644 --- a/Assets/Mirror/Components/NetworkTransform/NetworkTransformReliable.cs +++ b/Assets/Mirror/Components/NetworkTransform/NetworkTransformReliable.cs @@ -11,6 +11,7 @@ public class NetworkTransformReliable : NetworkTransformBase uint sendIntervalCounter = 0; double lastSendIntervalTime = double.MinValue; + [Header("Additonal Settings")] [Tooltip("If we only sync on change, then we need to correct old snapshots if more time than sendInterval * multiplier has elapsed.\n\nOtherwise the first move will always start interpolating from the last move sequence's time, which will make it stutter when starting every time.")] public float onlySyncOnChangeCorrectionMultiplier = 2; diff --git a/Assets/Mirror/Components/NetworkTransform/NetworkTransformUnreliable.cs b/Assets/Mirror/Components/NetworkTransform/NetworkTransformUnreliable.cs index ec5d3e14a..10cdb5f27 100644 --- a/Assets/Mirror/Components/NetworkTransform/NetworkTransformUnreliable.cs +++ b/Assets/Mirror/Components/NetworkTransform/NetworkTransformUnreliable.cs @@ -10,6 +10,7 @@ public class NetworkTransformUnreliable : NetworkTransformBase uint sendIntervalCounter = 0; double lastSendIntervalTime = double.MinValue; + [Header("Additonal Settings")] // Testing under really bad network conditions, 2%-5% packet loss and 250-1200ms ping, 5 proved to eliminate any twitching, however this should not be the default as it is a rare case Developers may want to cover. [Tooltip("How much time, as a multiple of send interval, has passed before clearing buffers.\nA larger buffer means more delay, but results in smoother movement.\nExample: 1 for faster responses minimal smoothing, 5 covers bad pings but has noticable delay, 3 is recommended for balanced results,.")] public float bufferResetMultiplier = 3;