Hi, I want to use the joystick API of Love2D, but I don't know what is supposed to be the name of the RT/LT/RB/LB buttons (like, for example the name for the right arrow of the joystick is "dpright"). I want to use the function isGamepadDown. Does anyone knows ?
Is there some kind of list available somewhere, with all the names ?
Thanks for the help
What are the names of RT/LT/RB/LB buttons for Love 2D ?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Harrylechienfou
- Prole
- Posts: 30
- Joined: Tue May 21, 2019 2:02 pm
-
- Party member
- Posts: 512
- Joined: Wed Oct 05, 2016 11:53 am
Re: What are the names of RT/LT/RB/LB buttons for Love 2D ?
Code: Select all
triggerright - right trigger, axis value
triggerleft - left trigger, axis value
rightshoulder - right shoulder, button value
leftshoulder - left shoulder, button value
List of the axes is here, and list of buttons is here.
- Harrylechienfou
- Prole
- Posts: 30
- Joined: Tue May 21, 2019 2:02 pm
Re: What are the names of RT/LT/RB/LB buttons for Love 2D ?
Thanks ! Everything is working fine with a 360 controller, but not with an arcade stick for some reason. What is weird is that the stick is detected but it doesn't seems to be working anyway. Does the code need some kind of mapping ?
Re: What are the names of RT/LT/RB/LB buttons for Love 2D ?
If joystick:isGamepad() returns false then you'll need to bind buttons/axes using setGamepadMapping() before any of the gamepad methods will work.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
- Harrylechienfou
- Prole
- Posts: 30
- Joined: Tue May 21, 2019 2:02 pm
Re: What are the names of RT/LT/RB/LB buttons for Love 2D ?
Ok I see, thanks for the help !
Who is online
Users browsing this forum: Google [Bot] and 81 guests