From 7054220a40ed9ab7da347fc199b91d51bb6f4b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Cor=C3=A9n?= Date: Tue, 17 Apr 2018 14:52:13 +0200 Subject: [PATCH] Replaced deltaTime usage with Unscaled deltaTime --- MLAPI/MonoBehaviours/Core/NetworkingManager.cs | 2 +- MLAPI/MonoBehaviours/Prototyping/NetworkedTransform.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MLAPI/MonoBehaviours/Core/NetworkingManager.cs b/MLAPI/MonoBehaviours/Core/NetworkingManager.cs index 20df98f..d07274e 100644 --- a/MLAPI/MonoBehaviours/Core/NetworkingManager.cs +++ b/MLAPI/MonoBehaviours/Core/NetworkingManager.cs @@ -813,7 +813,7 @@ namespace MLAPI.MonoBehaviours.Core lastTimeSyncTime = NetworkTime; } - networkTime += Time.deltaTime; + networkTime += Time.unscaledDeltaTime; } } diff --git a/MLAPI/MonoBehaviours/Prototyping/NetworkedTransform.cs b/MLAPI/MonoBehaviours/Prototyping/NetworkedTransform.cs index e6f2458..64d8abd 100644 --- a/MLAPI/MonoBehaviours/Prototyping/NetworkedTransform.cs +++ b/MLAPI/MonoBehaviours/Prototyping/NetworkedTransform.cs @@ -135,7 +135,7 @@ namespace MLAPI.MonoBehaviours.Prototyping //Snap, set T to 1 (100% of the lerp) lerpT = 1f; } - lerpT += Time.deltaTime / timeForLerp; + lerpT += Time.unscaledDeltaTime / timeForLerp; transform.position = Vector3.Lerp(lerpStartPos, lerpEndPos, lerpT); transform.rotation = Quaternion.Slerp(lerpStartRot, lerpEndRot, lerpT); }