Joystick Question

Blitz3D Forums/Blitz3D Beginners Area/Joystick Question

NewtSoup(Posted 2005) [#1]
I am using a Microsoft Sidewinder ForceFeedback 2 Joystick (usb device):

I have 8 buttons
A hat
A twist rudder
x and y axis
throttle

The throttle is on JoyU
JoyUDir() returne -1,0 or 1 (expected)
JoyV() returns -1 constant
JoyYaw() and JoyPitch() return -180 constant, was expecting rudder on JoyYaw() possibly
JoyHat() works as expected

The rudder is on JoyRoll()
The x axis is on Joyx
the y axix is on JoyY

buttons work as expected

Ok I can access all the functions of my joystick which is all that really matters but my questions are:

what devices use JoyV() JoyPitch() and JoyYaw()?
why is the throttle not on JoyZ()?
is this normal?

is it something to do with emulating old style analog sticks?


doctorskully(Posted 2005) [#2]
Here's what I know: JoyX() and JoyY() are used for, well, x and y positioning; any other axis functions (i.e. JoyZ() or JoyV()) seem to be used as just excess things on the joystick, like the throttle. The throttle USED to be on JoyZ() but now it is on...whatever else. The main probelm is that it seems to depend on your joystick where the input is coming into. (Take mine, for example: My throttle used to be on Joyz(), then Joyv() after an update, now it's on something else after another one...)

JoyPitch() and JoyYaw() seem to be worthless with my joystick as well. They may have to do with much more complicated joysticks, and I apologize that I cannot assist you there. As I said before, what functions what part of the joystick is assigned to depends on the joystick. Personally, I'd stick with x, y, and the buttons; perhaps you could write some code to adjust for different brands of joysticks (especially the throttle). Try not to make anything too specific to your joystick -- compatability's a nightmare!


NewtSoup(Posted 2005) [#3]
Yeah, thanks for your input (scuse pun) I guess Mark is one of the few people that knows exactly why and whatfor :) at least all the functionality is there and I will extend my controls libary to cope with all possible solutions.

Wonder how the joystick functions behave with a PS2 controller? (2 analogue sticks 1 D-Pad 10 buttons)