I am working on an endless runner game for iOS and Android, and I am trying to simply scroll my background by at a consistent speed on the X Axis. I am currently using the below code for the background scrolling, and while the scrolling works, it is a little “jerky” and “stuttering” on iOS, and even more so on Android (I am testing using an iPhone 6, iPad Mini Retina, and Samsung Galaxy 4 Tab).
//This should stop Unity from trying to grab the Transform component of my gameobject each frame!
// I have dragged this gameobject into this variable in the inspector!
public Transform me;
void Update ()
//Make sure that scroll speed equals MissionControl's speed!
scrollSpeed = MCscript.speed;
//Move to the left, consistently!
me.Translate (Vector3.left * Time.smoothDeltaTime * scrollSpeed);
I’ve looked online and found a variety of different options to try and fix this problem, and none of them have worked for me, but it seems like almost all of them involve V Sync settings which I don’t think I have control of on mobile. Can anyone help? Thanks in advance for your help, and let me know if you need anything else from me at all!
(Using Unity 5 Personal License on a MacBook Pro Retina 13inch Early 2015 model)