Search code examples
androidlibgdxoverlap2d

use overlap2d in libgdx has some wrong, can not fill the screen.why?


I use the 0.1.1 version of overlap2d. and can not fill my screen. here is my code:

mSceneLoader = new SceneLoader();
mSceneLoader.loadScene("MainScene", new StretchViewport(480, 800));

and in the render meathod:

mSceneLoader.getEngine().update(delta);

And when I run on my note4. enter image description here


Solution

  • The viewport should probably have WORLD units rather than pixels. You can probably check that in the overlap2d editor.

    I think it is shown in this tutorial: https://www.youtube.com/watch?v=bhvHm2sM0qo