title: Libgdx, artifacts appears when moving camera
body: <p>I'm trying to make smooth following camera using this algorithm:</p>
  
  <pre><code>camera.position.add((pos.x - camera.position.x) * 1.2f * deltaTime, (pos.y - camera.position.y) * 1.2f * deltaTime, 0);
  </code></pre>
  
  <p>It works fine(camera movements are smooth), but when I move the player appears this artifacts:
  <a href="https://i.stack.imgur.com/ImsdG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ImsdG.png" alt="Before the movement"></a></p>
  
  <p><a href="https://i.stack.imgur.com/hVgUe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hVgUe.png" alt="After the movement"></a></p>
  
  <p>Player move() function:</p>
  
  <pre><code>moveX(SPEED  * deltaTime);
  </code></pre>
  
  <p> </p>
  
  <pre><code>protected void moveX (float amount) {
          float newX = pos.x + amount;
          if (!map.doesRectCollideWithMap(newX, pos.y, getWidth(), getHeight()))
              pos.x = newX;
      }
  </code></pre>