(1) Is there not a button(s) for the left/right triggers?
https://love2d.org/wiki/GamepadButton
(2) What is the 4th argument supposed to be?
https://love2d.org/wiki/love.joystick.setGamepadMapping
Code: Select all
success = love.joystick.setGamepadMapping( guid, button, inputtype, inputindex, hatdir )
Code: Select all
if joystick:isGamepadDown("start") then
--code
end
(4) If I use the following code:
Code: Select all
if joystick:isGamepadDown("rightstick") then
--code
end
(5) If I use the following code:
Code: Select all
if joystick:isGamepadDown("leftshoulder") then
--code
end
(6) The whole d-pad doesn't respond, nor have I even tried the analog sticks. Here is my code in the love.load():
Code: Select all
joysticks = love.joystick.getJoysticks()
joystick = joysticks[1]
love.joystick.setGamepadMapping( joystick:getGUID(), "a", "button", 1, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "b", "button", 2, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "x", "button", 3, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "y", "button", 4, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "back", "button", 5, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "guide", "button", 6, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "start", "button", 7, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "leftstick", "button", 8, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "rightstick", "button", 9, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "leftshoulder", "button", 10, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "rightshoulder", "button", 11, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "dpup", "button", 12, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "dpdown", "button", 13, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "dpleft", "button", 14, nil )
love.joystick.setGamepadMapping( joystick:getGUID(), "dpright", "button", 15, nil )