Where does the default camera actions come from?

So when I load up a box in JME3 I get default WASD +Q & Z keyboard actions along with the mouse interactivity. I would like do know where this arises from? Is it possible to clear all interactions and then make my own with out overwritten thtem?(For instance, if i make a game where i allow the user to set their own keyboard action and they set the letter “E” to go forward and they accidently pressed “W” this could ruin gameplay from accidently presses so thats why i ask is there a way to just “Clear all” mouse and keyboadr actions?



First time poster! Long time lurker! I appreciate the help every0ne. Any bronies in here?

WASD goes from FlyByCamera.java. I guest you won’t be able to browse the code of that file if you use JMP, but you can look here

And if you want to use your own controls, then clear the mappings by [java]inputManager.clearMappings();[/java] and then you should redefine them similar way they are defined in the source file from the link I gave you above.

Ah, Thanks for the source code link that helps alot!



So when I do a basic game and it extends SimpleApplication, “SimpleApplication” is where the FlyByCam controls are being set/ran from?

There is a section on some of the default camera options in the tutorials, it does not go into detail but does explain what it does and how to turn it off…

I’ve been over the tuts a thousand times, thank you tho I just needed to know that the WASD interactions wasn’t maggiclly being programmed through the compiler…

So when I do a basic game and it extends SimpleApplication, “SimpleApplication” is where the FlyByCam controls are being set/ran from?

Yes, in SimpleApplication FlyByCamera is being set, and "attached" to the camera. It's only purpose to add controls :)

In the next stable update, you’ll be able to easily remove the fly by camera from your SimpleApplications by supplying your own set of starting app states upon creation or removing the camera app state during simpleInit().



No longer will you have to take a sledge hammer to InputManager’s mappings just to remove the fly cam. I fixed this all in SVN a few weeks ago but it hasn’t made it into stable yet.

@pspeed said:
In the next stable update, you'll be able to easily remove the fly by camera from your SimpleApplications by supplying your own set of starting app states upon creation or removing the camera app state during simpleInit().

No longer will you have to take a sledge hammer to InputManager's mappings just to remove the fly cam. I fixed this all in SVN a few weeks ago but it hasn't made it into stable yet.

Good news! In my current project my way was not to use simple application at all mainly because of flycam - I just extended Application. class and added my appstates there with all the keyboard redefinition functions, custom cameras, etc.

Ugh. Still sounds like the really hard way to go. On the one hand, using SimpleApplication you have to reset the input manager. On the other, you have to reimplement all of the things SimpleApplication does for you with respect to state manager, etc… basically the whole update() method. And you have to make sure to keep your home-grown update() in sync with changes we make to core.



Seems easier just to remove the input mappings, personally.



Anyway, it’s all better in SVN.

@pspeed said:
Ugh. Still sounds like the really hard way to go. On the one hand, using SimpleApplication you have to reset the input manager. On the other, you have to reimplement all of the things SimpleApplication does for you with respect to state manager, etc... basically the whole update() method. And you have to make sure to keep your home-grown update() in sync with changes we make to core.

Seems easier just to remove the input mappings, personally.

Anyway, it's all better in SVN.

My thoughts exactly when I was considering my options to programming controls for camera/player experience.



@KayTrance said:
Good news! In my current project my way was not to use simple application at all mainly because of flycam - I just extended Application. class and added my appstates there with all the keyboard redefinition functions, custom cameras, etc.

I wanted to do that but i'm so new to JME3 i figured there was a reason why it was setup this way thanks for confirming this.


@pspeed said:
In the next stable update, you'll be able to easily remove the fly by camera from your SimpleApplications by supplying your own set of starting app states upon creation or removing the camera app state during simpleInit().

No longer will you have to take a sledge hammer to InputManager's mappings just to remove the fly cam. I fixed this all in SVN a few weeks ago but it hasn't made it into stable yet.


Can't wait