Hide collision layer in libgdx with TiledMap?
- by Daniel Jonsson
I'm making a 2D game with libgdx, and I'm using its TileMapRenderer to render my map which I have made in the map editor Tiled. In Tiled I have a dedicated collision layer. However, I can't figure out how I'm supposed to hide it and its tiles in the game.
This is how a map is loaded:
TiledMap map = TiledLoader.createMap(Gdx.files.internal("maps/map.tmx"));
TileAtlas atlas = new TileAtlas(map, Gdx.files.internal("maps"));
tileMapRenderer = new TileMapRenderer(map, atlas, 32, 32);
Currently the collision tiles are rendered on top of everything else, as I see them in the map editor.