In my code, I use the the ShapeRenderer to draw some basic rectangles after my batch drawing. (Not inside of course)
The code looks like:
shapeDrawer.setColor(0.8f, 0.8f, 0, 1);
shapeDrawer.rect(playerRect.x - 200, playerRect.y - 355, 500, 6);
shapeDrawer.setColor(1, 1, 0, 1);
shapeDrawer.filledRect(playerRect.x - 200, playerRect.y - 355, 500 / neededXP * playerXP, 6);
The problem is that whenever my player moves, this bar sort of stutters behind by a pixel or two, whereas every other element that's drawn in the initial batch is in sync with the player.
Is this because things within the batch calls are all rendered simultaneously, and that the shaperenderer is going later, or is it because of something I'm doing?
A side note: If I zoom the camera out even a little bit this stops, I haven't tested a different starting camera zoom though.