问题
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.
来源:https://stackoverflow.com/questions/38226563/libgdx-viewports-why-when-i-use-fitviewport-the-touch-input-x-and-y-is-not-acc