- Home /
Game runs in slow motion in iOS even using Time.deltaTime
My game runs in what seems to be slow motion in iOS, which is very strange, considering I use Time.deltaTime when handling movement. Absolutely everything is slower, including my timers (which I use many methods for, from coroutines to tracking time with a float I subtract Time.deltaTime from), and animations (using Unity's animation system, which shouldn't be affected).
I have confirmed that Time.timeScale is set to 1 both in editor and when it is running on iOS. Time.timeScale is the only thing I can think of that should have this affect on the game, but it's set to default. I've tried building for different versions of iOS and for with different renderers and I've had the exact same effect. I have no idea what could be causing this. Any thoughts?
How many FPS do you have ?
Since Time.deltaTime is the time between two frames, if you have 1s between every frames (1fps) then everything will be 'slow'.
$$anonymous$$y FPS on iOS is 30, which is standard for that platform. It isn't choppy. It's perfor$$anonymous$$g well. The only issue is everything is slow, including timers.
For instance, I have a coroutine that plays a music clip and waits for the length of the clip. The clip plays, but the timer doesn't finish until much after. Characters also move slowly, and animations play slowly.
IS it safe to say that Time.timeScale hasn't been messed with?
As stated, I've confirmed Time.timeScale to be set to the default, 1, on in both the editor and iOS.
By any chance are you changing Time.timeScale value through any of your scripts? It's worth checking.
Answer by Ante · May 12, 2015 at 10:20 PM
After creating a new project with my timer test script and seeing that it works as intended in the new project, I checked the settings between the two projects to see what was different. It turns out that the maximum allowed timestep was changed in the time settings, and that was causing things to slow down at a lower frame rate.
Your answer
Follow this Question
Related Questions
How to calculate swipe speed on iOS 2 Answers
Lerp - Time Remaining 1 Answer
Reset speed after a specified time 0 Answers
Time release Collectable 1 Answer