Hot answers tagged

1

You are probably using Gdx.graphics.getHeight() to change orientation of vertical axis from recieved click. If this is the case following code should work correctly: Vector2 bulletDirection = new Vector2(screenX - player.getX(), (Gdx.graphics.getHeight() - screenY) - player.getY()).nor(); Also there is better way using unproject described here as it will ...


1

There are many ways to get to this, and you might need several iterations over the architecture before getting it right. Because of this, this answer will be quite broad. You could consider your game from three different points of view: the simulation, i.e. what happens in the game the 3d render of the game, i.e. the display of how is your world organized ...


1

Wrapping a tiled map can be achieved by rendering the TiledMap multiple times if the camera position is closer to the borders of the map than the size of the camera viewport. So for example on a map that is 16 world units wide and viewed by a camera with a viewport width of 8 and the camera is at X=2 then the map needs to first be renderer as normal using ...


Only top voted, non community-wiki answers of a minimum length are eligible