Tag Info

New answers tagged


It should be easy to distinguish between portrait and landscape by checking Screen.height > Screen.width. From a display perspective you are unable to distinguish between Portrait/PortraitUpsideDown and LandscapeLeft/LandscapeRight. However it is possible to disable any of these by setting any of the following to false: autorotateToLandscapeLeft ...


I have never used a viewport without a stage, but replacing width and height with the calls to Gdx.Graphics.getHeight/getWidth that you are using causes the same behavior you are experiencing. Removing those calls and using the passed values should fix your problem. public void resize(int width, int height){ stage.getViewport().update(width, height, ...

Top 50 recent answers are included