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
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