GamePad Support?
Blitz3D Forums/Blitz3D Beginners Area/GamePad Support?
| ||
Does B3d support Gamepads? If so can someone give me an example? |
| ||
Check the following link, there's a bunch of joystick commands with examples: http://www.blitzbasic.com/b3ddocs/command_list_2d_cat.php?show=Input |
| ||
Thanks, but I mean Dual Analog Gamepads, not joysticks. |
| ||
Terrybull: It's actually the same thing. It's just that a gamepad has got 2 joysticks and the viewtower on a gamepad is misplaced:) But yes it works if it's the answer you were looking for :D |
| ||
Yes - often the controls map to different 'joy' commands in blitz. On the gamepads I use the joyx/y are for the left thumbstick or dpad and the right thumbstick is joyz and joyhat(roll?) I think... |
| ||
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. |
| ||
yes it works fine, I use a PS2 dualshock pad on my PC through a USB adaptor and it works great. |