Replaced deltaTime usage with Unscaled deltaTime
This commit is contained in:
parent
89e666d09a
commit
7054220a40
@ -813,7 +813,7 @@ namespace MLAPI.MonoBehaviours.Core
|
|||||||
lastTimeSyncTime = NetworkTime;
|
lastTimeSyncTime = NetworkTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
networkTime += Time.deltaTime;
|
networkTime += Time.unscaledDeltaTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ namespace MLAPI.MonoBehaviours.Prototyping
|
|||||||
//Snap, set T to 1 (100% of the lerp)
|
//Snap, set T to 1 (100% of the lerp)
|
||||||
lerpT = 1f;
|
lerpT = 1f;
|
||||||
}
|
}
|
||||||
lerpT += Time.deltaTime / timeForLerp;
|
lerpT += Time.unscaledDeltaTime / timeForLerp;
|
||||||
transform.position = Vector3.Lerp(lerpStartPos, lerpEndPos, lerpT);
|
transform.position = Vector3.Lerp(lerpStartPos, lerpEndPos, lerpT);
|
||||||
transform.rotation = Quaternion.Slerp(lerpStartRot, lerpEndRot, lerpT);
|
transform.rotation = Quaternion.Slerp(lerpStartRot, lerpEndRot, lerpT);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user