Turning off mouse doesn't work after new release

Hey guys, I had this function:


/** function that disables mouse controls if true */

private void turnOffMouse(boolean b) {

if(b == true)








inputManager.setCursorVisible( true );




that worked like a charm until I updated to the latest SVN and it doesn’t work. I was wondering if there’s a way to fix it without having to revert back to an earlier version.


Sounds like you turn off the mouse during initialize.

SimpleApplication was modified to turn the camera into an app state so that you can optionally include or uninclude it. (ie: you can easily have no fly cam at all). The down side of this change is that since it isn’t initialized until after simpleInit() runs then your deleteMapping calls are too early (though I’m surprised they didn’t throw an exception).

At least that’s the theory. I’d have to know more about your SimpleApplication setup to be sure.

If you want to get rid of the fly cam completely then you can either use the alternate constructor on SimpleApplication to just pass the app states you want or you can remove the app state during init:

stateManager.detach( stateManager.getState( FlyCamAppState.class ) );

1 Like

that solves it :slight_smile: