PS3 Controller joysticks sticks
Posted: Sat May 12, 2012 11:25 pm
Hi guys,
I'm trying to use my PS3 controller as an input device.
I found this thread viewtopic.php?f=5&t=618&p=5980&hilit=analogue#p5980
And it seems that there is some way to see what buttons constants are but I can't seem to find it on the wiki.
What I mean is, the X,circle, square and so on buttons seem to be a number between 1 and 19 which I found out from trial and error along with the numbers for all the other buttons, I can't seem to work out how to use the sticks,
this returns 0 : AxisNumber = love.joystick.getNumHats(1);
also zero: balls = love.joystick.getNumBalls(1)
So I'm a bit confused as how you find out what to put in: buttonDown = love.joystick.isDown(1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23); to identify that the sticks are being used.
I understand from reading around the web that the should go from 1 to -1 in each axis, which is exactly the control I'm after.
any examples of what to do would be really helpful or even if you know of a gizmo that points me in the right direction would be cool.
I'm Guessing I'm just being a plum and missing something really obvious as there doesn't seem to be too many people with this issue or similar on this forum, but feel free to point out my stupidity anyway, all part of the learning curve I guess.
thanks for your time in advance and sorry if I've missed a thread that answers this already (I looked all afternoon, but haven't come across much that helps).
I'm trying to use my PS3 controller as an input device.
I found this thread viewtopic.php?f=5&t=618&p=5980&hilit=analogue#p5980
And it seems that there is some way to see what buttons constants are but I can't seem to find it on the wiki.
What I mean is, the X,circle, square and so on buttons seem to be a number between 1 and 19 which I found out from trial and error along with the numbers for all the other buttons, I can't seem to work out how to use the sticks,
this returns 0 : AxisNumber = love.joystick.getNumHats(1);
also zero: balls = love.joystick.getNumBalls(1)
So I'm a bit confused as how you find out what to put in: buttonDown = love.joystick.isDown(1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23); to identify that the sticks are being used.
I understand from reading around the web that the should go from 1 to -1 in each axis, which is exactly the control I'm after.
any examples of what to do would be really helpful or even if you know of a gizmo that points me in the right direction would be cool.
I'm Guessing I'm just being a plum and missing something really obvious as there doesn't seem to be too many people with this issue or similar on this forum, but feel free to point out my stupidity anyway, all part of the learning curve I guess.
thanks for your time in advance and sorry if I've missed a thread that answers this already (I looked all afternoon, but haven't come across much that helps).