Mapping controller buttons
(0 = “joystick button 0”, etc) 0 : a 1 : b 2 : x 3 : y 4 : L1 5 : R1 6 : - 7 : + 8 : L3 9 : R3
3rd axis (Joysticks and Scrollwheel) : LT/RT (L2/R2) 4th : right stick horizontal 5th : right stick vertical 6th : dpad horizontal 7th : dpad vertical
https://docs.unity3d.com/ScriptReference/Input.GetAxis.html
“To add a new input, add 1 to the number in the Size field.”
Or, right-click and choose “Duplicate Array Element”
Script references are tied to the name of the entry in the Axes list. If axis name is “myaxis”, the code to reference it would be:
|
|
re-rolling grid selector with gamepad
- set gamepad mode = true
- if gamepad mode, and selector button pushed (X?), cast from camera, use that position as starting point
- draw selection to new camera point as joystick moves
- on button release, do selection stuff