Question

I'm using the OrthogonalTiledMapRenderer in libGDX 0.9.9 to render a tiled map in tmx format.

maprend = new OrthogonalTiledMapRenderer(board.getTiledMap(), sprtbatch);

This renderer renders just one single tile in the bottom left corner.

render() {  //(shortened)
sprtbatch.setProjectionMatrix(camera.combined);
maprend.render(); }

Using an IsometricTiledMapRenderer with the same constructor renders the whole map. Is there a known bug in the orthogonal renderer or am I using it wrong?

Was it helpful?

Solution

You need to call maprend.setView(camera); before calling maprend.render();.

Note: There is no need to set the projection matrix of the spritebach there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top