1

Why does my libGDX resize code break camera.unproject?

view story
linux-howto

http://stackoverflow.com – I'm using the following code in my resize method to maintain aspect ratio across multiple screen sizes: @Override public void resize(int width, int height) { float aspectRatio = (float)width / (float)height; float scale = 1f; Vector2 crop = new Vector2(0, 0); if (aspectRatio > globals.ASPECT_RATIO) { scale = (float)height / (float)globals.VIRTUAL_HEIGHT; crop.x = (width - globals.VIRTUAL_WIDTH * scale) / 2f; } else if (aspectRatio < globals.ASPECT_RATIO) { scale = (float)width / (float)globals.VIRTUAL_WIDTH; crop.y = (heig (HowTos)