JoyAxisEvent evt.getValue()

What does this value represent… or maybe I should ask what is this value represented by?

It is a value between -1.0 and 1.0, but seems to be effected by both axis. Is it a Quaternion rotation? or?

Actually, there is a bit more to this question than just what is above.

getDeadzone() has a description that anything below value 0 can safely be ignored, but it would seem that negative values are important in distinguishing what direction along a given axis the joystick is being pulled.

So… question part 2: What good is getDeadZone()? Or… how do you use it correctly, considering the JavaDoc description?

dead zone represents a +/- value near 0 that should be ignored. Old analog joysticks would drift just sitting there without being touched. There is a dead-zone built into the input manager anyway, as I recall.

An axis runs from -1 to 1 with 0 being the center. There is nothing special about it. If you are seeing it change when you move the joystick in a different direction then either you are really moving both or your joystick is strange/broken.

You can run the joystick test that was added some months ago to see how your joystick reacts to a graphical representation of a gamepad.

@t0neg0d said: What does this value represent... or maybe I should ask what is this value represented by?

It is a value between -1.0 and 1.0, but seems to be effected by both axis. Is it a Quaternion rotation? or?

Guessing it’s the amount of “push” on a joystick. positive number = away, negative = towards and zero = no change? Could also be reverse. I think the best would be to plug a joystick in and see how it reacts.

If my memory serves right I think it was Paul who dabbled with that last.

Edit: Yup. Ninja’d.

Post about the joystick tester:
http://hub.jmonkeyengine.org/forum/topic/gamepads-with-jme/page/3/#post-189738

Picture of how thorough I was:

1 Like

Hey guys… thanks for answering… however, I am seeing odd results with the XBox360 controllers I have tried.

I’m not getting separate values per axis… they seem to be blended or some such thing.

The events are through the raw input listener (if that makes a difference).

EDIT: Oh… should mention that the post linked above and the test file are the two examples I was using for this test.

Here is a for example: (I’ve tested this on 4 different 360 controllers)

About 1/3 of the time if you press the jotstick right, a solid 1.0 value comes through always. The other 2/3 the time ti seems to pass through a correct value.

EDIT: I mean -1.0 sorry

@t0neg0d said: Here is a for example: (I've tested this on 4 different 360 controllers)

About 1/3 of the time if you press the jotstick right, a solid 1.0 value comes through always. The other 2/3 the time ti seems to pass through a correct value.

Is 1.0 not correct? Or you mean that it goes straight from 0 to 1? Is the joystick in analog mode or not? When you calibrate the joystick in the windows utility (presuming you are on windows) does it behave as expected?

@pspeed said: Is 1.0 not correct? Or you mean that it goes straight from 0 to 1? Is the joystick in analog mode or not? When you calibrate the joystick in the windows utility (presuming you are on windows) does it behave as expected?

Testing this now…

Ok… not seeing an issue… which goes with my original thought that this is me issue, not an actual problem.

I’ll keep plugging away at the test file you put together until I find out what I am not doing correctly with the axis eval for direction.