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

余生长醉 提交于 2019-12-01 07:55:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!