I'm using Java to create a simple game in 2D
.
However, I would like to get the DX of the mouse so that i can move a certain object to a different place with my mouse in my game.
When i was learning a bit of LWJGL
, there was a method called
Mouse.getDX()/~.getDY()
It returns the movement on the x/y axis
since last time getDY()
was called.
But I'm not sure how to get such value without using any other libraries like LWJGL
. I only know how to get the Mouse Position using the MouseListener interface. Or is there anything I've done wrong? Thanks if you can answer :)