InputHandler undergoing major changes

Additional complaint. :o



When I set this line:


input.getKeyboardLookHandler().setActionSpeed(50.0f);



I get my "flying" (WSAD) keys to move pretty well, but the arrow keys for rotation just are way too fast at that speed.  Is there any way to adjust the action speed for specific keys or is this just a fault in the design of the FirstPersonHandler that needs to be addressed?

darkfrog
adenthar said:

wiill you make a special post to explain the modification needed [...] ?

Yes, I want to put something in the Wiki on that, something like "How to use the input system"...
darkfrog said:

I get my "flying" (WSAD) keys to move pretty well, but the arrow keys for rotation just are way too fast at that speed.  Is there any way to adjust the action speed for specific keys or is this just a fault in the design of the FirstPersonHandler that needs to be addressed?

Hm, yes this could be considered a flaw in FirstPersonHandler (same as before btw.), or the method setActionSpeed maybe should not be used at all in the handler, but only in the actions... this would require getting the single actions in a more appropriate way...

I have finished the work on the handlers - to see important new features in action have a look at TestInputHandler, AbsoluteMouse and InputHandler.addAction(InputAction, String, int, int, boolean).

New features:

  • mouse / keyboard / joystick / other devices nearly completely exchangeable because of common addAction method and triggers
  • pluggable application defined devices to be used by InputHandler possible (I will demonstrate this with a custom device soon)
  • AbsoluteMouse location update happens only if mouse is moved, cursor could be controlled by joystick (if some application needs that)



    Wiki article and demo are still pending…

Woah, what the heck.

Wow, jinput seems to have big issues on your machine. Maybe you could run some jinput demo some time… but to avoid the problem the new joystick support is disabled by default now.



As I'm going to write a Wiki article about adapting games for the new input stuff, it would be good if you could PM me your compiler output - to help me regard all these points (and because there should be only warnings not errors  :|)…

Right now I'm on my laptop which doesn't have all the latest stuff on it.  I will PM you the very long thing it outputted sometime tomorrow hopefully.  I should probably mention that I'm doing this all on OS X 10.4; perhaps the native jinput library itself might be "moderately" broken for this platform (some developer forgot to comment out debug code or something).  If you didn't write any of those output statements then it's most likely a problem within the library itself (is there a debug flag or something?).



However, I am curious as to whether or not you (or anyone else) notices the same thing I do with HelloIntersection: the fact that only one bullet can be fired?


However, I am curious as to whether or not you (or anyone else) notices the same thing I do with HelloIntersection: the fact that only one bullet can be fired?

This was a bug that is fixed now - thanks!
itistoday said:

If you didn't write any of those output statements then it's most likely a problem within the library itself (is there a debug flag or something?).

No jme itself does not output that. And I don't know about debug flags in jinput, sorry.

Hello,

Is there a wiki article on the new input system available at all?



ty,sv

Yes a small one: http://www.jmonkeyengine.com/wiki/doku.php?id=inputsystem_and_inputhandler_guide

I still have to work on it but can't convince myself to take the time :wink: - still working on the JMEDesktop stuff and input system improvements…

Thanks Irrisor.



I'm just refactoring my input system to the new work, and while there are examples to work from it makes it much easier to understand the overall subsystem if there is a guide doc to work from. Trawling through code to put a picture together just takes a lot of time, especially when refactoring and doing multiple jobs.



ty,

sv

Quick question relating to the new InputHandler.  I'm trying to add functionality for when "ALT" is down the mouse pointer is visible.  How would I go about doing this since KeyInput doesn't seem to have a KEY_ALT?



darkfrog

I don't know why but constants for the Alt keys are named KEY_LMENU and KEY_RMENU