Steering a player with mouse & keyboard (for the 1000th time) :-)

I created the controls system for better handling of input specific to game development like this.

I would take a look at TestSwingControlEditor.  It's actually a very good example of how to manage controls for an object and it's extraordinarily easy to use…you also get a cool editor for free (but obviously you're not forced to use it if you choose not to). :wink:

darkfrog said:
I would take a look at TestSwingControlEditor.

Thanks, I'll have a look at that! *bows to darkfrog*

Only that... Uh-oh... I accidentally made a cvs update... Nooo... jME-Physics_2 doesn't find packages anymore... Why do I keep doing that... "Never touch a running system..."

Hi Darkfrog,

OK, I saw that there are two TestSwingControlEditors in the TestChooser, one based on GameControlEditor (input handling) and one on GameSettingsPanel, good to know, I will need something like that soon.

How do I use the TestSwingControlEditors demo, does it work for you? It always shows the TestChooser again on top of the GameControlEditor window and I can’t really see more than two fields. When I close the TestChooser dialog, everything hangs. When I leave it open, move it aside and switch applications to trigger a redraw of the GameControlEditor window, it still doesn’t redraw. Weird.

But before I deal with setting panels, I need to get my firstPersonHandler set up to turn the player when the mouse moves… (see above)

PS: Removed original follow-up question because it was blbost.

PPS: New question: What is torque and does it help me to turn the player? Hahaha, DarkFrog, you’ve been asking the exact same question 1.5 years ago! :stuck_out_tongue:

Actually I've never used the TestChooser before…you're right, it seems to have weird issues when you try to run that test. :o

Just go directly to jmetest.input.controls.TestSwingControlEditor, there should be only one.  You can run it and see it in action.

The settings panel is just a simple mechanism to show how you can set controls to work with a spatial.  If you just set mouse movement to rotation in the control editor that should work just fine.  Again, you can explicitly set the controls instead of using the controls editor, it's just that test couples those features together.  It's a good example of a controls editor and a game using controls.

Are you using jME-Physics?  If so this won't necessarily help you if you're wanting to apply forces to apply movement.

hehe, here’s something that may help you resolve your issues.  I’ll tell  you up-front that it’s using the old jME-Physics and will definitely not work with the latest version of jME, but you might be able to gain some idea how to do physics player manipulation with it:,85.0.html

Yessss. I found a nice hack. Bow before my 1337ness. Or not.