I've searched the forums and I've been unable to find anybody else complaining of this behaviour, so I figured I'd post. It's not hard to reproduce: Open TestAbsoluteMouse and add a single line to the end of simpleInitGame():
mouse.setSpeed(2f);
Run it in a window, and move the mouse cursor to (and past) the extreme right side or top of the window. It exhibits strange wrapping behaviour.
Three questions:
Does anybody else see this behaviour or is it just me?
Is this the proper way to accelerate mouse movement?
If this is the proper way to accelerate mouse movement and it's not just me, how is it that nobody else is having issues? Or am I the only one that wants to allow a user to set their mouse speed in-game?
I think its because in AbsoluteMouse.java in update action it uses width/height instead of limitwidth/limitheight when recalculating the localTranslation when you hit the edge of the window.
e.g. change it like below in the relevant xUpdateAction and yUpdateAction :-
The one thing I am not sure about is that the pointer will stop at x=0, y=0 - but doesn't stop at x=limitwidth, y=limitheight UNLESS you use setUsingDelta(true); on the mouse object. I don't know if this is desired/expected behaviour tho...