iOS touch input stutters randomly

Hi

Short version:

When I drag an object in circles around the screen on my iPhone and iPad continuously for a little while, every couple of minutes the object stutters for 5-15 seconds. The screen frame rate is a solid 60 fps, but the touch input goes all choppy, so everything looks butter-smooth except for the object I’m dragging across the screen, which moves all jittery.
I think the problem is that the touch input works at a different rate than the screen, as suggested here:
http://answers.unity3d.com/questions/393417/camera-not-moving-smoothly-on-drag.html

Detailed version:

A few weeks ago I encountered an issue with unity that has become a big problem for me.
The problem is that touch input stutters for about 5-15 seconds every couple of minutes.
I’ve tried it on a couple of iPhones and iPads and can reproduce it 100% of the time.

Note that it’s not that the frame rate drops (on the contrary, it’s 60 fps all the time). The problem is that the touch input goes all jittery for 5-15 seconds and then goes back to being butter-smooth. It looks like the touch input refresh rate dropped from 60hz to 10hz for a few seconds.

This is a problem for me because in my game you’re always dragging the main character across the screen with your finger, so it looks awful when the main character moves all jittery around the screen as you drag it.

This is the script:

void Update () {
	
	if (Input.touchCount == 1)
	{
		Touch touch = Input.GetTouch(0);
		
		if (touch.phase == TouchPhase.Moved)
		{			
			Ray ray0 = Camera.mainCamera.ScreenPointToRay(touch.position);
			transform.position = ray0.origin + ray0.direction * (-ray0.origin.z);
		}
	}
}

I think the problem is that the touch screen runs at its own refresh rate, like this thread suggests:
http://answers.unity3d.com/questions/393417/camera-not-moving-smoothly-on-drag.html
However the suggested solution doesn’t solve the stuttering, and it doesn’t make a lot of sense to me why it would.

Anyway, this is the game if you want to see why the stuttering is a deal breaker for me (though you can’t see the stuttering in the video it’s really apparent IRL)
http://www.youtube.com/watch?v=1hOmgLBqBwQ#t=0

And you can download the project from here:
http://dl.dropbox.com/s/9r4o16zcw0q8fxx/touchJitter2.zip

I’m using iOS 7 and unity 4.3.2.

Please give me a hand if you know how to solve this, I’ve been struggling with it for a good couple of weeks. I’ve tried a few different things, even smoothing the input but it still looks awful.

Thanks for reading.
-Nacho.

Hi, I suspect the problem you are experiencing is due to a bug in iOS 7. The issue seems to, at least, be linked to the Control Center and Notification Center-- those menus that appear when sliding from the top or bottom of the screen. In my experience, once those menus have appeared it negatively affects the update rate of the touch screen in certain (or maybe all?) applications and games. Movement of the player is jerky in the games I’ve tested-- mostly Cave’s output like ESPGaluda II and Dodonpachi games.

Try going to Settings > Control Center and disable access within apps, then reset the device (on my iPod Touch 5th gen I press and hold the home button and sleep/wake button together for about 10 seconds until the Apple logo appears). Once it finishes rebooting do not activate the Control Center or Notification center and test your game. Hopefully it will be better, or at least happen less often.

As a new user to iOS and iOS development in general this is pretty disappointing. I plan to contact Apple about it soon, as you’re not the only person experiencing spotty touch controls.

I’m playing Espgaluda 2 HD on my iPhone 5 (ios 10.3.3) and i do notice that while everything else runs at 60 fps, my character is jerky, slides at a lower framerate, and it randomly becomes smoother or less smooth (usualy after enteribg a new level). Curiously, if i drag up CC while playing the game, my character becomes PERFECTLY smoot, as it should be. How can i permanently fix this?,I’m playing Espgaluda 2 HD on my iPhone 5 (ios 10.3.3) and i do notice that while everything else runs at 60 fps, my character is jerky, slides at a lower framerate, and it randomly becomes smoother or less smooth (usualy after enteribg a new level). Curiously, if i drag up CC while playing the game, my character becomes PERFECTLY smoot, as it should be. How can i permanently fix this?!