Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
16
Question by apiotuch · Nov 21, 2009 at 02:55 AM · inputgamecontroller

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

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image siddharth3322 · Jun 26, 2016 at 07:35 AM 0
Share

How to access "joystick button 0"?

avatar image JohannesMP · Apr 19, 2017 at 09:32 AM 0
Share

Since I am working cross-platform on $$anonymous$$acOSX, WebGL and Windows, I recently consolidated a list of all Possible bindings: https://gist.github.com/Johannes$$anonymous$$P/dbed5bf463200874329980709f363966

Things to note: - $$anonymous$$ac is almost always completely different, both for buttons and for axis. - WebGL is unified on all OS (so WebGL in $$anonymous$$ac browser will have same bindings as WebGL in Windows browser) - WebGL and Windows are almost identical, except that Windows can use axis 3 for an average of both triggers, and windows does not have button bindings for the dPad (while WebGL and mac both do)

16 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by apiotuch · Nov 21, 2009 at 03:29 AM

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

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
5
Best Answer

Answer by apiotuch · Nov 21, 2009 at 05:26 AM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
15

Answer by gyro · Jan 10, 2010 at 11:39 AM

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Snowglider · Jul 21, 2015 at 01:40 AM 0
Share

Does anyone have any idea why this happens? I just had a controller switch from the A = 0 map to this one yesterday.

avatar image
13

Answer by dustypantz · Oct 04, 2013 at 11:59 PM

http://wiki.unity3d.com/index.php?title=Xbox360Controller

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image xfudox · Jul 24, 2017 at 08:22 AM 1
Share

Just for anyone that stumble here now (24/07/2017), the page is currently down, is there anyone who knows where to get it?

I know that page and it's one of the most useful page on the controller topic.

avatar image
6

Answer by Brian-Kehrer · Nov 21, 2009 at 03:05 AM

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

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image apiotuch · Nov 21, 2009 at 03:20 AM 0
Share

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.

avatar image Brian-Kehrer · Nov 21, 2009 at 03:35 AM 0
Share

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

avatar image apiotuch · Nov 21, 2009 at 03:41 AM 0
Share

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

  • 1
  • 2
  • 3
  • 4
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Xbox360 Wired Controllers 1 Answer

Invisible Key input? Help! 1 Answer

Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers

Make input code execute once on MouseDown 1 Answer

Multiple Inputs not being registered 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges