Closed TimerErTim closed 2 years ago
This is the expected behavior for those two callbacks. One could access the delta
properties at the time the event is triggered in order to get the delta of the mouse position. input.deltaX
and input.deltaY
, return the _deltaX
and _deltaY
values so we would be getting the latest value even in the events.
Thank you very much! You have written a great library combining the best of both Korge and KTX. I think this will be my goto 2d game engine for Kotlin. I am excited for the future development of littlekt.
Thanks and very glad to hear it! 😊
Following methods from the
InputProcessor
are delivering the current positional arguments for the pointer device:touchDragged(Float, Float, Pointer)
mouseMoved(Float, Float, Pointer)
However, I think a better way would be to either deliver the delta value between the current and the last call or to provide both the current pointer position and the previous one.
In this example, one could do the following: