- Home /
Inconsistent jitter in iOS
I am working on a very simple vertical scrolling game for Unity iOS. My game is experiencing inconsistent jittering. I have searched the web extensively looking for a solution without any luck. I am using Unity version 5.3.4 f1.
The Game
A character is falling down. We are using unity's character controller to move the character in
Update()
(`Time.deltaTime` is being multiplied).Camera is following the character in
LateUpdate()
.Since the character is moving down, the obstacles seem to be moving upward the screen.
There are no rigid bodies in the scene. And there are no major spikes in the profiler.
We have very simple geometry and very few draw calls/ set pass calls (avg. 7 set pass calls).
We have constant 60 fps.
Since we are running on iOS vSync is by default On and cannot be disabled.
The Problem
The background elements/ obstacles (Trees, rocks etc.) start jittering for no apparent reason. The behaviour is inconsistent, some times it jitters and sometimes it does not.
Even when it does not jitter we experience small stuttering when user gives input via touch.
What we have tried
We have tried all combinations of
Update()
,LateUpdate()
,FixedUpdate()
,Time.deltaTime
Time.smoothDeltaTime
, Lerp, reducing the scene to a few cubes and removing all colliders and triggers.We have already studied the following threads: Link1, Link2, Link3 and countless other threads.
Initially our game was running at the default 30 fps. But after some research it seemed that our problem was due to the difference between "Frame Rate" and "Screen Refresh Rate". (to understand this issue see the following LINK). Since iOS devices have a refresh rate of 60Hz we have set our target frame rate to 60 and our game maintains a constant 60 fps.
After setting the target frame rate to 60 the jitter has improved but now it is inconsistent.
I am all out of ideas. Any help or pointer will be highly appreciated. Thanks in advance.
Did you ever found a solution for this? I'm suffering from the same jitter effect in a pretty simple 2D game. Profiler looks fine and so does Xcode's built in CPU counter which never exceeds 70%. I'm pulling my hair out right now, trying to just get smooth motion on iOS.
Setting the target frame rate to 60 helped a bit. Also try the following Link
Your answer
Follow this Question
Related Questions
Stuttering every 2 seconds 2 Answers
60FPS constant, but serious visual stutter - only on iOS 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How do I fix Camera stuttering in first person? 1 Answer
Motion stuttering, gfx.WaitForPresent, high fps, external position 0 Answers