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 RandomCharacters · Dec 05, 2014 at 10:53 PM · controllerjoysticksetup

How do you set up a 2nd joystick controller?

I looked for this on google and tried looking at the asset store input managers. I couldn't find what I need. I have 2 tanks and wanted 2 people to control them. Tank 1 is already set, so how do I set up tank 2? On windows I plug in a Logitech joystick and wanted to put in another (USB). It's that simple. Thanks.

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

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Lunatix · Dec 06, 2014 at 11:25 AM

You need to configure a second control set (Player1Vertical, Player2Vertical, ...). Player 1 uses "Input.GetAxis("Player1Vertical") and player 2 uses "Input.GetAxis("Player2Vertical") (and so on).

For joystick axes, choose "Type: Joystick Axis", "Axis: X/Y..", "Joy Num: Joystick 1,2,..". For joystick buttons, choose "Type: Key or Mouse Button" and format your input definition like this: Positive Button: "joystick 1 button 0", "joystick 2 button 0"...

alt text alt text


joybutton.png (12.4 kB)
joyaxis.png (11.5 kB)
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
1

Answer by ThatOneGuy359 · Sep 24, 2017 at 07:15 PM

yes but looking into it i cant seem to find how the (heck) you are supposed to get the second joystick input to work joystick 1 works but for my horizontal/vertical look (that should be done by the second joystick) but when i input joystick 2 my logitech 310 game pad, unity seems keen on only accepting inputs from joystick 1 (the left joystick) while joystick 2 seems to be lacking any input.

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
0

Answer by mrthang · Oct 12, 2017 at 04:02 AM

http://answers.unity3d.com/questions/1419236/joystickcontroller-not-work.html

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 mrthang · Oct 12, 2017 at 04:02 AM 0
Share

i need people help

avatar image
0

Answer by bdilloughery_mvla · Mar 09, 2020 at 05:50 PM

I also tried this, and for some reason only the first joystick is being detected on any given controller. I have set the fields to specifically look at "Joystick Axis", "X Axis" and "Joystick 2" ...

Any USB controller (have tried multiple) that I plug in, Unity only detects the left joystick as either Joystick #1 or Joystick #2. The X and Y both get detected fine by no 2nd joystick is detected at all. I've tried 4 different controllers. No matter what I try, only one joystick ever gets read from a single controller.

------EDIT----- Fixed this. Instead of going to Joystick #1 X axis, then Joystick #1 Y axis, then Joystick #2 X Axis ... The second joystick is still on "Joystick #1", as that is which controller you have plugged in. Instead of X Axis or Y Axis, it is the 3rd and 4th Axis that you need to use. Works perfectly.

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

29 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 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

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Controller Joystick Hold Delay Logic? 1 Answer

player controller script jump buttom 0 Answers

2 Player Joystick game 1 Answer

How to use joystick.js script? it's not appearing in monodevelop. 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