Skip to content

Commit

Permalink
Real time now listens to time scale
Browse files Browse the repository at this point in the history
  • Loading branch information
acidbubbles committed Aug 28, 2023
1 parent b4cdb82 commit 288dd7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AtomAnimations/Animations/AtomAnimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void Update()
{
case TimeModes.RealTime:
var currentUpdateTime = _stopwatch.Elapsed;
deltaTime = (float)(currentUpdateTime - _lastUpdateTime).TotalSeconds;
deltaTime = ((float)(currentUpdateTime - _lastUpdateTime).TotalSeconds) * Time.timeScale;
_lastUpdateTime = _stopwatch.Elapsed;
break;
case TimeModes.RealTimeLegacy:
Expand Down Expand Up @@ -89,7 +89,7 @@ public void FixedUpdate()
{
case TimeModes.RealTime:
var currentFixedUpdateTime = _stopwatch.Elapsed;
deltaTime = (float)(currentFixedUpdateTime - _lastFixedUpdateTime).TotalSeconds;
deltaTime = ((float)(currentFixedUpdateTime - _lastFixedUpdateTime).TotalSeconds) * Time.timeScale;
_lastFixedUpdateTime = _stopwatch.Elapsed;
break;
case TimeModes.RealTimeLegacy:
Expand Down

0 comments on commit 288dd7e

Please sign in to comment.