I'm new to jME and I've made the Flag Rush Tutorial more or less.
Now, I've got the problem that I don't manage to include a mouse in my app…
I can see something that looks like a cursor, but I can't move it…
I use this code which I found somewhere in the wiki:
// Create a new mouse. Restrict its movements to the display screen.
am = new AbsoluteMouse("The Mouse", display.getWidth(), display
// Get a picture for my mouse.
TextureState ts = display.getRenderer().createTextureState();
URL cursorLoc = HelloMousePick.class.getClassLoader().getResource(
Texture t = TextureManager.loadTexture(cursorLoc, Texture.MM_LINEAR,
// Make the mouse's background blend with what's already there
AlphaState as = display.getRenderer().createAlphaState();
// Get the mouse input device and assign it to the AbsoluteMouse
// Move the mouse to the middle of the screen to start with
am.setLocalTranslation(new Vector3f(display.getWidth() / 2, display
.getHeight() / 2, 0));
// Assign the mouse to an input handler
am.registerWithInputHandler( input );
I think the problem is the last variable "input".
As this variable doesn't exist, I just created it myself, but I think I did something wrong...
Can anyone help me please?