libgdx Viewports - Why when I use FitViewport the

2020-03-28 04:24发布

问题:

libgdx Viewports - Why when I use FitViewport the touch input x and y is not accurate?

回答1:

Use viewport.unproject() instead of camera.unproject() so the cropping of the FitViewport is taken into acount.