chore(NetworkTransform): Additional Settings Headers

This commit is contained in:
MrGadget 2024-04-17 02:29:49 -04:00
parent 5c2c7d11c2
commit 05af4e9101
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ public class NetworkTransformReliable : NetworkTransformBase
uint sendIntervalCounter = 0; uint sendIntervalCounter = 0;
double lastSendIntervalTime = double.MinValue; 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.")] [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; public float onlySyncOnChangeCorrectionMultiplier = 2;

View File

@ -10,6 +10,7 @@ public class NetworkTransformUnreliable : NetworkTransformBase
uint sendIntervalCounter = 0; uint sendIntervalCounter = 0;
double lastSendIntervalTime = double.MinValue; 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. // 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,.")] [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; public float bufferResetMultiplier = 3;