I have working code to display a tiled map. It's composed of a
OrthogonalTiledMapRenderer and an
camera.setToOrtho(false, WORLD_WINDOW_SIZE.x, WORLD_WINDOW_SIZE.y); renderer = new OrthogonalTiledMapRenderer(tiledmap, 1 / TILE_WIDTH); renderer.setView(camera);
So far so good. The map is rendered as seen from above:
My question is, how do I render it with the camera not facing right down to the floor?
Like this: [Thanks to all GIMP developers :) ]
Is it possible? I tried
Camera.rotate(45) but it rotates in the wrong axis. I can't set
Camera.direction because of this - taken from
OrthogonalTiledMapRenderer.setView(camera) documentation :
Sets the projection matrix and viewbounds from the given camera. If
the camera changes, you have to call this method again. The viewbounds are taken from the camera's position and viewport size as well as the scale. This method will only work if the camera's direction vector is (0,0,-1) and its up vector is (0, 1, 0), which are the defaults.
If I change the camera direction, the renders are weird or non-existant.
Is it possible to do so with the standard LibGDX api? If not, how can I do this? If not are there any workarounds to get the same effect?