title: libgdx - setProjectionMatrix
body: <p>I am trying to render some sprites and I need the line <code>batch.setProjectionMatrix(cam.combined);</code> in order for the sprites to move independently from the camera, however when I add this line the sprites suddenly turn abnormally large, but without it they are just normal. I have the suspicion that it changes the world dimensions or something like that, because the the boundaries I set for the player sprite are also expanded, just like the size of the sprites, but the background (a tiledmap rendered with a OrthogonalTiledMapRenderer) stays the same.</p>
  
  <p>This is the normal rendering as it should be: <a href="https://ibb.co/m4T2GT" rel="nofollow noreferrer">https://ibb.co/m4T2GT</a></p>
  
  <p>This is the rendering i get when using setProjectionMatrix: <a href="https://ibb.co/j0EL38" rel="nofollow noreferrer">https://ibb.co/j0EL38</a></p>
  
  <p>(I used an external site for the pictures because for some reason I could not add them here)</p>
  
  <p>This is my render function. </p>
  
  <blockquote>
    <p>player.draw(..);</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>e.draw(..);</p>
  </blockquote>
  
  <p>just call the draw function of the Sprite class.</p>
  
  <pre><code>public void render() {
      handleInput();
      renderer.setView(cam);
      renderer.render();
  
      batch.setProjectionMatrix(cam.combined);
      batch.begin();
      player.draw(batch);
  
      for (Entity e: enemies) e.draw(batch);
  
      batch.end();
  }
  </code></pre>