0
我在使用IsometricTiledMapRenderer進行渲染時出現了等軸測圖逆時針旋轉90度的問題。LibGDX IsometricTiledMapRenderer問題
問題的圖像。 http://imgur.com/a/144QP
public class Heist extends ApplicationAdapter {
public static final String MAP_NAME = "map.tmx";
OrthographicCamera camera;
IsometricTiledMapRenderer mapRenderer;
TiledMap map;
SpriteBatch batch;
@Override
public void create() {
batch = new SpriteBatch();
camera = new OrthographicCamera();
camera.setToOrtho(true, 30, 20);
map = new TmxMapLoader().load(MAP_NAME);
mapRenderer = new IsometricTiledMapRenderer(map, 1/32f);
mapRenderer.setView(camera);
}
@Override
public void render() {
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
mapRenderer.render();
batch.end();
}
}