Quantcast
Channel: Answers for "How to fast forward time (or just skip it) properly?"
Viewing all articles
Browse latest Browse all 4

Answer by robertbu

$
0
0
When you set 'Time.timeScale = 90', time will pass 90 times as fast. This means that Time.deltaTime will also be accelerated by 90x. So if it takes 1/3 of a second to skip the dialog, your worldTime will advance by 30 seconds. I see two possible fixes. First, you could change your letterPause variable to something small to cause the typing to go quickly rather than increasing Time.timeScale. Or you can save and restore worldTime. For the latter I mean something like: function SkipDialogLineAction (){ if (dialogInteractions.currentState == DialogStates.ShowTextLine){ Time.timeScale = 90; worldTimeSaved = worldTime; } } if(currentState == DialogStates.Idle && Time.timeScale == 90){ Time.timeScale = 1; worldTime = worldTimeSaved + 5.0; }

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>