So I was messing around with the new joystick support, and I've got all the buttons and axis mapped out for my wireless 360 controller, but I notice that it's set up so that the triggers are on the 3rd axis.
Currently, the way it's set up, if you pull the right trigger, the 3rd axis goes from 0 to -1. If you pull the left trigger, the 3rd axis goes from 0 to 1. The problem is, that if you pull both triggers at once, the axis stays at 0, since the 1 and -1 cancel each other out. Because of this, there's no way that I can see to differentiate between the two triggers when they're both being used at the same time.
From what I've seen of other joystick input stuff, the triggers are set to seperate axis, so I'm wondering if you guys could fix that for the next release?
Also, it'd be neat if you could get the rumble packs to be triggerable as well. I haven't seen that as much on PC, though, so perhaps it'd be harder to get working.
Also, also, here's a neat little program I made in löve as an example for the joystick support:
360 joystick problem
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: 360 joystick problem
Yeah, I remember the SDL docs state that some controllers use axes 2 and 3 for extra buttons. I'll borrow an Xbox360 controller and see if it's possible to "fake it", i.e. observe the input the controller generates, and somehow create normal button-pushing events from the input.
Rumble: not supported by SDL.
Rumble: not supported by SDL.
Re: 360 joystick problem
Well, it would be nice to still have the triggers as axis, because then you can see how far the trigger is pulled in. But it should be two seperate axis, and not just one.
Re: 360 joystick problem
Ah, of course. Then I don't think it can be done (with SDL).
- amnesiasoft
- Prole
- Posts: 12
- Joined: Wed Aug 20, 2008 8:59 pm
- Location: Denver, Colorado
- Contact:
Re: 360 joystick problem
The only way I know of to differentiate between the axes is either installing the XBCD driver (I think that lets you optionally map the triggers to different axes), or through the XInput API.
- Sardtok
- Party member
- Posts: 108
- Joined: Thu Feb 21, 2008 2:37 pm
- Location: Norway/Norge/諾威/挪威 (Yes, I'm teh back!)
- Contact:
Re: 360 joystick problem
Not sure what XBCD or Xinput is, but I'm guessing they somehow relate to DirectX.
As far as I know, and I have a 360 controller, you can only work with them individually in DirectX.
You could use XNA, but it wouldn't be very LÖVEly.
Not even Windows can tell in the control panel that they are separate axes, at least not in XP, maybe in Vista.
As far as I know, and I have a 360 controller, you can only work with them individually in DirectX.
You could use XNA, but it wouldn't be very LÖVEly.
Not even Windows can tell in the control panel that they are separate axes, at least not in XP, maybe in Vista.
Take off every Zigg for great rapist.
Now, outgay that!
Now, outgay that!
Re: 360 joystick problem
Ok, thanks amnesiasoft and Sardtok. That's good to know.
- amnesiasoft
- Prole
- Posts: 12
- Joined: Wed Aug 20, 2008 8:59 pm
- Location: Denver, Colorado
- Contact:
Re: 360 joystick problem
XBCD is a custom written driver for the xbox 360 controller for Windows. As far as I can tell, the main purpose of it is to let you change the triggers from analog buttons into digital ones so they can be used in more games. Never actually installed it though since I've not had a need for that.Sardtok wrote:Not sure what XBCD or Xinput is, but I'm guessing they somehow relate to DirectX.
XInput is a part of DirectX. It's an API designed specifically for access to the Xbox 360 controller. It allows you to query the gamepad state, then check if particular buttons were pressed (Instead of Joystick button 0, which could be anywhere on the controller, and likely the user will have no idea which one it is, you can check for the a button instead). It also includes various other features specific to it such as checking battery type, battery level, what type of controller it is (Guitar, Dancepad, Drums, Gamepad, Flight stick, etc...). Basically, it's DirectInput that gives up flexibility in exchange for much greater ease of use.
Who is online
Users browsing this forum: Bing [Bot] and 9 guests