Right now I'm a bit stuck in the jME input handler code. I've been looking at DebugGameState, FirstPersonHandler, MouseLookHandler, RelativeMouse and MouseLook and I'm a bit puzzled how this stuff works together and why it was assembled that way.
In order to understand the input subsystem better I decided upon writing my own simple mouse input handler:
- I subclassed InputHandler (let's call it FooInputHandler) and made sure FooInputHandler#update(int tpf) is called during the GameState#update(int tpf) method
- FooInputHandler adds a MouseInputAction and prints InputActionEvent#getTriggerName() on every performAction(InputActionEvent evt) call
As a result the console is flooded with "X Axis" mouse events. It makes no difference wether the mouse is outside the window, inside the window, moved, clicked, etc. Even entirely detaching the mouse device yields the same result. The thing which puzzles me even more that only "X Axis" events are reported - clicking and moving the mouse around (including the Y Axis) don't seam to affect the output at all.
In the MouseLook#performAction(InputActionEvent evt) code I found that the 'evt' is just being ignored and it relies on the Mouse object instead which must be passed as constructor argument.
Edit: One thing I should add - I'm using the latest jME from CVS.