Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by Wixelt · Oct 29, 2018 at 03:33 PM · inputmultiplayerxbox controller

Issues with multiplayer Xbox controllers and players (non-networked)

I am trying to set up a system for a game i'm working on in which the game, which is multiplayer but not online (for now) will accept four different sets of Xbox controller inputs (for now just the left stick, since that's the important bit), and move the correct player's character in the scene. I have arranged it to have a different set of inputs in the InputManager for each controller, both in Horizontal and Vertical directions, and each has been set to accept a numbered joystick, but it isn't working the way I want it to.

The first time I tried to get this working, initially with only two controllers, the Player 1 character could only be moved with the Player 2 controller, whilst the Player 1 controller moved Players 2, 3 and 4. This was annoying, but it got worse when the other two controllers were plugged in, and the Player 1 and 2 controllers did literally nothing. Player 1 could only be moved by the Player 4 controller, and Player 3 moved everyone else.

I have tried to find a way to fix this, but my skill level in regard to inputs isn't what it could be, and I have no idea what to do to move forward. My best option right now is to convince my team to bite the bullet and make the game entirely multiplayer and limit it to one player per client (even though networking, in my mind, is a pain in the ass), to avoid the issue, but that was what we were going to tackle after this step.

Anyone got any ideas? I'd be grateful.

Also, if you need further detail, just ask. :)

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
1

Answer by Legend_Bacon · Oct 29, 2018 at 03:42 PM

Hello there,


I also had these kinds of issues a while ago, and got fed up with the default Input handler. I stopped using it altogether (up to 5.6 at least, maybe it got better since then?)


You can find better-working alternatives on the unity asset store: search for "input", and browse. You might feel bad about spending money on something like this, but if this saves you even an hour of headaches it's all worth it.



Hope that helps!

Cheers,

~LegendBacon

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 Wixelt · Oct 29, 2018 at 03:44 PM 0
Share

It's something i'll look into, but i'd rather not have to spend money to sort this out if I can help it. Thank you for the suggestion, though.

avatar image
0

Answer by hectorux · Oct 29, 2018 at 03:56 PM

I made a Horizontal1 with joystick1, then Horizontal2 with joystick2. The players start with a number, and in the script i just put Input.GetAxis("Horizontal"+ playerNum)

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

175 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 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 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 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 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 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 avatar image

Related Questions

File Input 1 Answer

How do I fix issues with Xbox Controllers not working properly in both Engine and EXE? 0 Answers

Cinemachine Input Provider requires InputActionReference. Any workarounds? 0 Answers

Multiplayer server controls all players 0 Answers

How do I fix unity game not working correctly with a controller if it is plugged in before the game starts? 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