Libgdx camera/scaling issue

后端 未结 1 964
无人及你
无人及你 2021-01-25 16:31

This is just a really quick post wondering what i have done wrong?

I want the background to be filled on the whole screen with whatever screen sizes i have but this does

1条回答
  •  囚心锁ツ
    2021-01-25 17:24

    The problem is your asset is not the same size as the viewport. See the links below. Libgdx uses the Viewport class to handle this.

    How to deal with different aspect ratios in libGDX?

    How to scale image according to different screen resolutions in libgdx

    https://github.com/libgdx/libgdx/wiki/Viewports

    0 讨论(0)
提交回复
热议问题