GamePad Support?

Blitz3D Forums/Blitz3D Beginners Area/GamePad Support?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Matty is right, but they do vary slightly when in analogue or digital mode.

In analogue mode:

Left stick: JoyX/Y
Right stick: JoyR/Z
D-Pad: JoyHat

In digital mode:

Left stick: JoyHat
Right stick: JoyR/Z
D-Pad: JoyX/Y

The JoyHat command returns a float value between 0 and 1, which starts at 0 for up, 0.25 for right, 0.5 for down, 0.75 for left, and values for each of the remaining 4 diagonals. -1 is returned when no direction is being pressed.

Also note that the button that switches between digital/analogue modes will also be mapped to one of the buttons, so will always be in it's on state when in digital mode (possibly analogue). This is likely to be button 10 on a 10 button gamepad (buttons are numbered from 0) or the number after the standard buttons.