I am drawing with libgdx and using OrthographicCamera. During render I draw a bit more than the screen can contain. As OrthographicCamera is always centred my camera moves quickly to the last primitive a draw. That's not what I need. So I want my camera to move slowly What I need is to draw a lot of squares they are in GameRoute.Level[] and to slowly "walk along them" with the camera
@Override
public void render () {
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
/*Drawing moving route*/
int x = 0, y = 0;
for(int i = 0; i < Route.Size; i++){
batch.draw(GameRoute.Level[i].Step, x, y);
if (GameRoute.Level[i].getDir() == 0) {
x += 64;
}
if (GameRoute.Level[i].getDir() == 1) {
y += 64;
}
}
camera.position.set(0, 0, 0);
GameRoute.ExpandLevel();
batch.end();
}