- Home /
Setting up game pad
I have a Saitek Cyborg Rumble controller that's modeled after a ps3 controller and I was wondering how you would set up Unity to receive player inputs from the controller instead of the keyboard. I've messed with the input editor a little bit, but I'm thoroughly lost on it. I've never really messed with a game engine before I just have done modeling until now. Any help would be greatly appreciated. Thank you in advance.
Answer by Eric5h5 · May 19, 2010 at 06:59 PM
For gamepad buttons, set up new buttons in the input manager by using "joystick button x" for the positive or negative buttons, where x = the number of the button you want (starting with 0). The Type should be "Key or Mouse Button". To use this in scripting, use Input.GetButton("XX"), where "XX" is the Name of the entry from the input manager.
For gamepad analog sticks, set up new axes in the input manager by using "Joystick Axis" for the Type. The left stick would need two entries in the input manager, one horizontal (using the X axis), and one vertical (using the Y axis). The right stick would need another two, using the 3rd and 4th axes. To use these in scripting, using Input.GetAxis("XX"), where "XX" is again the Name of the entry from the input manager.
everything's set up in a new axis configuration and the scripting is right and it still doesn't get movement. I have no idea what I'm doing wrong. There ARE two sets of horizontal and vertical because my input size is set to 17. Could that throw things off?
it won't even program jump to a button when I change the input to a button. my computer's device listings show which buttons are which, and I tried the jump as a test. Jump will not function with any of the joystick buttons.
Answer by morymac · Jun 26, 2012 at 05:18 PM
Hi, just do it like Eric5h5 said! I just made a video on this topic. If you want to, you can take a look at it: