What I need is a way to detect the mouse moving, buttons being held down and the scroll wheel.
MouseMotionEvent and its friends look very promising, but the documentation does not show exactly how to write my own events handles.
It would be great to have a simple example that does nothing more than write the mouse coords to the output - but in the most simple way possible. With all imports needed.
Most examples in the documentation I see lean heavily on what is already available in the SimpleApplication-class without explaining what it is, what it does and where it comes from. The JavaDocs are not very user friendly for beginners like me and they do not tell a lot.
Here is what I am working on, just for fun. Currently I use the default camera.
Haha, I did browse the Wiki thoroughly, but it is not always very helpful. The examples leave out a lot of details that make it hard to implement them.
In this case, it dives immediately into this mapping stuff. I only need a way to attach my own code to a mouse event. The documentation suggests that it is possible using MouseMotionEvent but never tells how. It took me hours to figure where inputManager came from, but still it is not clear if this is what I need for my simple game.
With the code you shared: where do I invoke this in my code? And where do I go from there?