I want to implement an FPS-style mouse look in my lwjgl3 java application.
But when I use glfwGetCursorPos
to get the cursor position.
But the problem is that glfwGetCursorPos
is returning doubles but the decimal places are always zero.
Is there any workaround for that issue?
答案 0 :(得分:0)
您无法获得更精确的值,因为鼠标位置始终位于一个像素上。
如果你想获得0到1之间的值,你可以通过窗口宽度和窗口高度来测试mouseX和mouseY。