x


How to use the XBox 360 Controller D-Pad (PC) ?

Hi all,

After checking the forums i managed to setup an xbox controller for presentations, the only thing i don't understand is the d-pad. How does it work ? i wanted to use it as simple buttons and not axis. Is that possible? I see that the mac driver treat D-pad as buttons is that the case for PC too? . Thanks.

here are the mappings

http://answers.unity3d.com/questions/581/what-are-all-the-joystick-buttons-for-an-xbox-360-pc-controller

EDIT( I think i have to make a script that takes the Axis -1 1 and transform them to boolean buttons, is the dpad the 7th and 6th axis? .)

more ▼

asked Aug 12 '10 at 11:47 AM

alexnode gravatar image

alexnode
984 27 32 49

My answer isn't formatted well, don't know why it's doing that. The D-pad uses button 2,3,4,5

Aug 12 '10 at 12:29 PM Ares

I think the pc driver doesn't recognises the dpad as buttons but axis. Except if i am missing something really obvious in the input manager. But thanks anyway

Aug 12 '10 at 12:37 PM alexnode
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Yeah, the D-pad works.

Button 0 - nothing Button 1 - nothing Button 2 - DPad Up Button 3 - DPad Down Button 4 - DPad Left Button 5 - DPad Right Button 6 - Start Button 7 - Back Button 8 - Left Analog Stick Press Button 9 - Right Analog Stick Press Button 10 - Left Shoulder Button Button 11 - Right Shoulder Button Button 12 - XBox Button Button 13 - A Button 14 - B Button 15 - X Button 16 - Y Button 17 - nothing Button 18 - nothing Button 19 - nothing

Analog Stick Axes Same as drJones

5th Axis - Left Trigger 6th Axis - Right Trigger

I got this from here: http://forum.unity3d.com/viewtopic.php?t=5563&highlight=360+controller

It's possible to have more than one controller running at a time, I don't have that info on me right now.

Thanks, Ares

::edit:: I don't know why the formatting it jacked up.

alexnode pointed out I listed the layout for a MAC. PC treats the D-pad differently.
D-pad Up : +ve 7th Axis \n
D-pad Down : -ve 7th Axis \n
D-pad Left : -ve 6th Axis \n
D-pad Right : +ve 6th Axis \n
(copied from http://forum.unity3d.com/viewtopic.php?p=94453)

more ▼

answered Aug 12 '10 at 12:25 PM

Ares gravatar image

Ares
144 9

no this is for mac configuration, with the custom drivers. For PC is different 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

Aug 12 '10 at 12:34 PM alexnode

Yeah, I just saw that. I'm editting my answer.

Aug 12 '10 at 12:40 PM Ares

Thanks a lot Ares, but still i don't understand how to map them as buttons. What +ve means?

Aug 12 '10 at 12:53 PM alexnode

+ve -> positive -ve -> negative :)

Oct 27 '10 at 05:27 AM Jean Fabre
(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:

x954
x214
x60
x42

asked: Aug 12 '10 at 11:47 AM

Seen: 8550 times

Last Updated: Aug 12 '10 at 12:45 PM