Categories
Game Creation Mastering Development

How to add sprite batch on tile in isometric map in Libgdx

I’m using Libgdx to create an isometric game , but now I have problem. I want to add sprite on tile (3,4) , but I can’t do this, so I searched on stackoverflow , and I found this code :- public Vector2 twoDToIso(Vector2 punto) { Vector2 tempP = new Vector2(0, 0); tempP.x = (punto.x – […]

Categories
Development

How to rotate Perspective Camera in 3D Libgdx

I’m creating 3d game with libgdx but I have problem, I want to rotate the camera on touch the screen , so I added this from libgdx wiki @Override public boolean touchDragged (int screenX, int screenY, int pointer) { float deltaX = -Gdx.input.getDeltaX() * degreesPerPixel; float deltaY = -Gdx.input.getDeltaY() * degreesPerPixel; camera.rotate(Vector3.Y,deltaX*0.9f); camera.rotate(Vector3.X,360-deltaY*0.9f); camera.update(); return […]