It may be from drowsiness but I can't seem to figure out how to use the new gamepad API. I am trying to see if one of the d-pad buttons is pushed down using this: http://www.love2d.org/wiki/Joystick:isGamepadDown but I don't think I'm putting the right code in.
0.9 changes the Joystick API to have Joystick objects. So instead of love.joystick having all the functions which apply to single joysticks, the Joystick objects have methods for those.
To get the joystick objects you can use [wiki]love.joystick.getJoysticks[/wiki]. The joystick events ([wiki]love.gamepadpressed[/wiki], for example) also give them as arguments.
How old is the build of 0.9.0 you have (where did you get it from)? The ones on http://nightly.projecthawkthorne.com haven't been updated in 2 months unfortunately, so they're missing a lot of the changes (like the love.joystick rewrite.)
If you're on Windows, you can download a more up-to-date build here: 32 bit or 64 bit.
Hey I don't want to start a new thread so i'll ask this here. If I want to use the left stick of my xbox controller to move a circle around the screen. How would I get that the stick is being moved and in what direction?
NuclearSailor wrote:Hey I don't want to start a new thread so i'll ask this here. If I want to use the left stick of my xbox controller to move a circle around the screen. How would I get that the stick is being moved and in what direction?
I'm trying to figure out the same thing I'm not sure what I'm down.