How to use a Joystick in game?

Hello,

how do i use a joystick with JMonkey?



joyInput of the SimpleBulletApplication is always null.

Just recently i wanted to use a joystick(gamepad) too.

That’s what i found in the issues section:

“JInput joystick input implementation - Currently the input system relies on LWJGL to be available in the classpath

in order to use JInput. Instead it is preferable to use JInput directly

without LWJGL so that applications intending to use JOGL only do not

require LWJGL for joystick input.”

So i think it isn’t implemented yet? And i mean JME3.

“So i think it isn’t implemented yet? And i mean JME3”

It seems so.

Would be awesome!

It should be fairly easy to add support for it.

I added partial joystick support in my local copy since I needed it for a small project of mine. I guess at some point I’ll commit a fully functional implementation

Im using know JXInput its working fine and its easy to use.

http://www.hardcode.de/jxinput/

Right now I have the LWJGL joystick implementation working (which uses JInput under the hood).

Is JInput platform independent?

Could u please post the Code?

Im using JXInput, but its based on direct Input (Windows).

JInput works on the same platforms that LWJGL does, Windows, Linux, and Mac OS X.

I will commit the code to jME3 when it is ready.

1 Like

i cant wait, thx

For the moment i wrote a wrapper for JInput.