x


What are all the joystick buttons for an Xbox 360/PC Controller?

I'm having trouble mapping all the buttons/triggers in Unity's Input settings. Can anyone help me out on this one? Here's what I have so far:

A Button joystick button 0

B Button joystick button 1

X Button joystick button 2

Y Button joystick button 3

L Button joystick button 4

R Button joystick button 5

Back joystick button 6

Start joystick button 7

Left Analog pressed joystick button 8

Right Analog pressed joystick button 9

Left Analog X Axis Joystick Axis, X Axis

Left Analog Y Axis Joystick Axis, Y Axis

Right Analog X Axis Joystick Axis, 4th Axis

Right Analog Y Axis Joystick Axis, 5th Axis

What I don't have are the left and right triggers, and the center X/Home Button

more ▼

asked Nov 21, 2009 at 02:55 AM

apiotuch gravatar image

apiotuch
218 3 8 13

(comments are locked)
10|3000 characters needed characters left

8 answers: sort voted first

Left/Right on D-Pad Joystick Axis, Axis 6

Up/Down on D-Pad Joystick Axis, Axis 7

more ▼

answered Nov 21, 2009 at 03:29 AM

apiotuch gravatar image

apiotuch
218 3 8 13

(comments are locked)
10|3000 characters needed characters left

Left Trigger and Right Trigger both correspond to joystick axis, axis 3

more ▼

answered Nov 21, 2009 at 05:26 AM

apiotuch gravatar image

apiotuch
218 3 8 13

(comments are locked)
10|3000 characters needed characters left

in case anyone comes here looking for more button mappings for the xbox 360 controller, here's what worked for me (using the tattie-bogle driver for osx):

D-pad up: joystick button 5
D-pad down: joystick button 6
D-pad left: joystick button 7
D-pad right: joystick button 8
start: joystick button 9
back: joystick button 10
left stick(click): joystick button 11
right stick(click): joystick button 12
left bumper: joystick button 13
right bumper: joystick button 14
center("x") button: joystick button 15
A: joystick button 16
B: joystick button 17
X: joystick button 18
Y: joystick button 19
more ▼

answered Jan 10, 2010 at 11:39 AM

gyro gravatar image

gyro
122 5 4 8

(comments are locked)
10|3000 characters needed characters left

The triggers are not buttons, they are additional analog joystick axes, either 6th and 7th, or 7th and 8th. However they operate between 0-1 instead of -1 to 1.

The home button, I am not sure about, it may be a special mapped button and not accessible.

Also, are you on a Mac, or PC? On a mac, using the open source library, the mappings may be different, as well. I haven't tested the PC bindings, so I am not sure - Tattie Bogle OSX 360 controller driver

more ▼

answered Nov 21, 2009 at 03:05 AM

Brian Kehrer gravatar image

Brian Kehrer
3k 19 22 65

I am using this code if (Input.GetAxis("L Trigger")){ moveDirection.y = jumpSpeed; }

But I am not getting a response using any of 6 through 8 axis.

Nov 21, 2009 at 03:20 AM apiotuch

Try assigning them in the input editor, and referencing them from there. I have gotten a response from both triggers.

Nov 21, 2009 at 03:35 AM Brian Kehrer

The triggers are what I'm trying to script for.

Nov 21, 2009 at 03:41 AM apiotuch
(comments are locked)
10|3000 characters needed characters left

I have a follow up question on regarding a different (but very similar) contrller.

I have a Logitech Dual Action Gamepad that has many of the same button and triggers as the XBox contrller. The 'Left Analog X/Y Axis Joystick' works just fine with no mapping, as do many of the triggers. The right analog joystick does not work. I assume I need to do something with the Logitach Profile mapping tool so that the Unity input manager associates the right anaolg joystick with two of the extra axis' (e.g. 3rd thru 8th axis).

Is that correct? How do I do that? Is there a better approach? I definately want to use the input manager and axis input as opposed to any direct input (e.g. polling analog joystick).

Thanks Don

more ▼

answered Jun 02, 2010 at 01:40 PM

Don Hemminger gravatar image

Don Hemminger
31 3 2 2

Even if it's similar, it's still better to ask a separate, new Question, rather than use an Answer to someone else's Question, thanks.

Jun 02, 2010 at 03:48 PM Cyclops

I agree, this is a new question, not an answer. If at all, simply link this thread to your question. I only used the input manager for use with the Xbox 360 controller. I don't own the Logitech Gamepad you speak of, so I really can't try to figure it out for you. Sorry and good luck.

Jun 03, 2010 at 07:15 AM apiotuch
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1528
x48

asked: Nov 21, 2009 at 02:55 AM

Seen: 89348 times

Last Updated: Jul 08 at 01:02 PM