LibGdx-ViewPort width and height does not match for some devices
问题 I am using a Viewport for my libGdx landscape game like this. public static final int WORLD_WIDTH = 1280; public static final int WORLD_HEIGHT = 800; camera = new OrthographicCamera(); float aspectRatio = Constants.WORLD_WIDTH / Constants.WORLD_HEIGHT; ViewPort viewPort = new FillViewport(WORLD_WIDTH * aspectRatio,WORLD_HEIGHT, camera); I am using all positions in terms of this width and height. It is working fine in all devices except device that have screen resolution greater than 1300. In