Input mappings reset

Hey guys,

I want to reset the SimpleApplication input mappings. I’m following this tutorial and when I use this :

inputManager.deleteMapping( SimpleApplication.INPUT_MAPPING_MEMORY );

I get this :

java.lang.IllegalArgumentException: Cannot find mapping: SIMPLEAPP_Memory

Any ideas ? Is the tutorial outdated ?

Thanks.

The mappings aren’t initialized until after simpleInitApp() since they are done as part of app states (DebugKeysAppState in this case: http://hub.jmonkeyengine.org/javadoc/com/jme3/app/DebugKeysAppState.html )

…so you can just remove the app state if you want. Or if you want to only have things you add yourself then define a constructor for your application and call super(null)… or super( just your app states )

1 Like

Thank you ! I sorted the things out and placed the call of this function after simpleInitApp() ! I then used inputManager.clearAllMappings() and everything is fine.