سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top