Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by 88bueno · May 19, 2010 at 06:12 PM · gamepad

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.

Comment
Add comment
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

2 Replies

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

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.

Comment
Add comment · Show 2 · 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 88bueno · Jun 09, 2010 at 06:06 PM 0
Share

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?

avatar image 88bueno · Jun 09, 2010 at 06:19 PM 0
Share

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.

avatar image
0

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:

http://youtu.be/xR3l6rOkjLA

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

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

1 Person is following this question.

avatar image

Related Questions

Android multiple gamepad/controller/joystick support? 1 Answer

Keyboard/Joystick Inputs Do Not Work until Mouse Clicked 0 Answers

Is there a way to fire the inspector events from code? 0 Answers

Mayflash Gamecube controller vibration 0 Answers

Gamepad reconnect issue 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