title: Moving a sprite body causes jitter
body: <p>I am fairly new to unity development. I want to find out why when I move a sprite object, it is causing very noticeable jitter. I have read quiet some answers on the internet, some say things about rigidbody2d, some about fixed or late update etc etc. But my problem does not seem to be solved by any of those. I just have a sprite object, no rigidbody, just a gameobject with sprite renderer component and a script attached to it in an empty project containing a camera ofcourse. Here is the whole script I am using, you can just copy paste into a cs file named MoveBackground and it will work.</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class MoveBackground : MonoBehaviour {
  
  Vector3 pointA;
  Vector3 pointB;
  float timeRequired;
  public float speed = 5;
  IEnumerator movingEnum;
  float belowEdge;
  
  // Use this for initialization
  void Start () {
  
      Camera cam = Camera.main;
      float height = 2f * cam.orthographicSize;
      belowEdge = cam.transform.position.y - height/2f;
      movingEnum = StartMoving ();
      initializeAndMoveObject ();
  }
  
  // Update is called once per frame
  void Update () {
      // transform.Translate(0, (-1*speed * Time.deltaTime) / 100, 0);
      //this.gameObject.transform.Translate (0f , Time.deltaTime * speed,0f);
  }
  
  void MoveToNextPosition()
  {
      float distance = Mathf.Abs( Mathf.Sqrt (Mathf.Pow ((pointA.x - pointB.x), 2f) + Mathf.Pow ((pointA.y - pointB.y), 2f)));
      float time = distance/speed;
      timeRequired = time;
      movingEnum.MoveNext ();
  }
  
  IEnumerator StartMoving()
  {
      while (true) {
      yield return StartCoroutine(MoveObject(transform, pointA, pointB, timeRequired));
      }
  }
  
  IEnumerator MoveObject(Transform thisTransform, Vector3 startPos, Vector3 endPos, float time)
  {
      var i= 0.0f;
      var rate= 1.0f/time;
      while (i &lt; 1.0f) {
          i += Time.deltaTime * rate;
          thisTransform.position = Vector3.Lerp(startPos, endPos, i);
          yield return null;
      }
  
  }
  
  public void initializeAndMoveObject()
  {
      Vector3 moveTowardsPoint;
      SpriteRenderer sR = GetComponent&lt;SpriteRenderer&gt; ();
      Vector3 bounds = sR.bounds.extents;
      float height = bounds.y * 2f;
      moveTowardsPoint = transform.position;
      moveTowardsPoint.y = belowEdge - height / 2f;
      pointA = transform.position;
      pointB = moveTowardsPoint;
      MoveToNextPosition ();
  }
  
  }
  </code></pre>
  
  <p>This script moves the object from top to bottom. Also, I dont have an jitter when I run it on my computer in editor. But when I run it on device (iPhone6+) , it causes very very big annoying jitter, constantly, depending on how fast it is moving down.</p>
  
  <p>This is not the only method I have tried to make an object move, I have tried using</p>
  
  <pre><code>transform.Translate(0, (-1*speed * Time.deltaTime) / 100, 0);
  </code></pre>
  
  <p>in update and fixedupdate to no avail. I have tried using Quad for this purpose. (My gameobject just basically is a Bg that moves down). Piece of code for quad script is</p>
  
  <pre><code>public float speed = -0.5f;
  private Vector2 savedOffset;
  
  void Start () {
      savedOffset = renderer.sharedMaterial.GetTextureOffset ("_MainTex");
  }
  
  void Update () {
      float y = Mathf.Repeat ((Time.time * speed), 1);
      Vector2 offset = new Vector2 (savedOffset.x, y);
      renderer.sharedMaterial.SetTextureOffset ("_MainTex", offset);
  }
  
  void OnDisable () {
      renderer.sharedMaterial.SetTextureOffset ("_MainTex", savedOffset);
  }
  </code></pre>
  
  <p>If some one can guide me, I would be very thank full to you.</p>