public static void Visualize() { LerpDamping = 1f; double curTime = LockstepManager.Seconds; AccumulatedTime += (curTime - LastTime) * Time.timeScale; LerpTime = (float)(AccumulatedTime / FixedDeltaTime); if (LerpTime < 1f) { for (int i = 0; i < PeakCount; i++) { if (SimObjectExists [i]) { LSBody b1 = SimObjects [i]; b1.Visualize(); } } } else { AccumulatedTime %= FixedDeltaTime; ExtrapolationAmount = LerpTime; LerpTime = (float)(AccumulatedTime / FixedDeltaTime); if (Simulated) { for (int i = 0; i < PeakCount; i++) { if (SimObjectExists [i]) { LSBody b1 = SimObjects [i]; b1.LerpOverReset(); b1.SetVisuals(); b1.Visualize(); } } Simulated = false; } else { for (int i = 0; i < PeakCount; i++) { if (SimObjectExists[i]) { LSBody b1 = SimObjects[i]; b1.LerpOverReset(); b1.SetExtrapolatedVisuals(); b1.Visualize(); } } } } LastTime = curTime; }