title: While infinite loop with moving unity transform
body: <pre><code>while (transform.position != new Vector3(desX, desY))
  {
      // 2 - Movement
      Vector3 movement = new Vector3(
          0.1f * desX,
          0.1f * desY,
          0);
  
      //movement *= Time.deltaTime;
      transform.Translate(movement);
  }    
  </code></pre>
  
  <p>This part of my program crashes the Unity engine and I'm pretty sure it's an infinite loop but I can't figure out why or how to fix it.</p>