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
2
Question by CyberBinarin · Dec 30, 2014 at 03:51 AM · inputcontrollermultiple

Axis inputs mixed between controllers in build version

I ran into a problem while adding local play support to our multiplayer game, involving inputs. The trigger keys are working in the editor, but when I build and test the triggers are either ignored or listening to another controller. I'm testing with XBox One controllers, connected with USB cable, using official drivers. When I'm setting up the inputs it seems like 3rd axis is both triggers, negative being left and positive being right. But I want to be able to press both triggers at the same time, so I'm using 9th and 10th axis which are left and right triggers separately. alt text

But it seems like the only time RightTriggerX triggers is when I press up with the right stick on that controller and press the right trigger on another specific controller. But, as mentioned, this is working correctly in the editor, the problem occurs when I try a build version. This is how I check the inputs:

 public enum PadAxis {
     None, LSVertical, LSHorizontal, RSVertical, RSHorizontal, DPHorizontal, DPVertical, LeftTrigger, RightTrigger
 }
 
 public static float getRawInput(PadAxis axis, int joypadID) {
     float result = Input.GetAxisRaw(axis.ToString() + joypadID);
 
     //temporary log test
     if (Mathf.Abs(result) > 0.9f) {
         Debug.LogError(axis.ToString() + joypadID + " is pressed");
     }
 
     return result;
 }

Does anyone have an idea where the problem could be?

Edit: Using Unity version 4.5.5f1

Edit 2: I created a new project to see what would happened, and 9th and 10th axis did not react to anything. After going back to the real project the same issue happens in the editor as I described in the build. I'm almost certain I changed nothing in the code, so I have no idea where that came from.

triggerinputs.png (25.1 kB)
Comment
Add comment · Show 1
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 xipeluife · Nov 13, 2015 at 05:40 PM 0
Share

Same thing is happening to me, I´m using the latest build Unity5.2.2, did you solve this problem by any chance?

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by JuriKnauth · Feb 16, 2018 at 10:20 PM

2017.3.0f3 here. Yes its still an issue. Still wondering. Solution so far for me - don't use both triggers...

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 ethentianknight · Mar 19, 2018 at 11:56 PM

Currently running into the same issue. On build only, my triggers shuffle between controllers.

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 PartTimeMonkeyExtra · Mar 23, 2018 at 01:04 PM

Any update on this? Just ran into the same issue. Unity 2017.3.1p1,Any update on this? Just ran into this as well. Very annoying. Unity 2017.3.1p1

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 CyberBinarin · Mar 23, 2018 at 02:22 PM 0
Share

No updates. I imported XInput and stopped using Unity's input. Nice to hear this is still an issue 4 years later.

avatar image JuriKnauth · Mar 23, 2018 at 02:40 PM 1
Share

No news yet. I have reported the bug and Unity said that they were able to reproduce the bug. Haven't heard anything since.

link text

I put an example up on my git. link text


Further testing with a colleague lead to following observations/assumptions.

  • The error seems to appear randomly (If it does it's impossible to solve: rebuilding/re-plugging and rebooting won't have an effect). However next day it is impossible to reproduce the bug and yet even later it can be reproduced again.

  • See$$anonymous$$gly at least two controllers are needed and if the error occurs the input of at least two players seem to be faulty.

  • What appears to be happening is that the Triggers (Axis 9 and 10) are swapped with another player. There is a possibility that not only two players will swap the input of these two triggers but all their inputs get swapped. (e.g.: Player A has Triggers of B, while B has them of C and C has the Triggers of A)

  • Furthermore these inputs of a swapped Trigger are only registered - if any other Input is triggered on the original controller as well. (e.g.: Player A and B have swapped inputs. A's axis 9 and 10 however are only registered if B presses them on his controller AND A presses any other button on his controller at the same time.

  • ^^ Truly any other button can be pressed - even buttons which are not mapped in the Input-Editor of Unity.

  • Oh the bug can be reproduced within the editor of Unity and not just within the build application.

  • The order of the plug-ins don't seem to effect the bug. It is a good idea to initialize every controller one by one - but this doesn't seem to solve the problem either.

Sadly the input handling of unity is not reliable/robust when a Xbox controller is used. So I would recommend writing your own Input $$anonymous$$anager and import it to Unity. I haven't done so yet - but I thought about doing it some time in the future - if so I would gladly share it.

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

6 People are following this question.

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

Related Questions

Getting analog input values from multiple controllers 2 Answers

How do I use controller knob input like mouse position? (New Input System) 1 Answer

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

Thrustmaster wheel controller giving me weird values 0 Answers

Add different input for On Click event (UI) 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