After solving the JAR/dll problem in my last (and first
) thread, I'm moving on...
I'm using a Logitech USB gamepad, and its left analog stick to move a character left/right. In a method for processing poll data I check event.getComponent().getIdentifier() to find out which component was polled. In the case above I look for Component.Identifier.Axis.X (left analog is polled) and then call methods to update character position and animation. However, more often than not, the event registered is coming from Component.Identifier.Axis.Y instead of X; for example when polling max to the left (X axis) its hard to avoid polling some small value on the Y axis aswell. I would be fine if BOTH X and Y values were registered, but it seems one is replacing the other?
I could look for that small Y axis value too, but this gets confusing when the character is moving to the right (max right on left analog); if only ONE component at a time is registered, my character behaves unexpectedly to say the least
In comparison: when using the older JInput version (with dxinput.dll; see my JAR problem thread..) with the Axis class, I had no problem with moving characters or controlling their animations. So I was aaalmost ready...then I had to do it all over again, to make it work running my app as a JAR with this new version
I need some advice; are there other components (than X / Y) to use when checking the analog sticks?
Thanks for listening.