Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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
0
Question by Gambsmoore · Feb 20, 2017 at 09:43 AM · c#controllersticknegativeanalog

[SOLVED] My XBOX controller right stick is always stuck at -1.

Hey there, I've been struggling with this for the better part of an hour and I figured I'd post here before I go to sleep.

In unity I have RightHorizontal and RightVertical bound to Joystick axis 4 and 5 accordingly, see here: alt text

I have these set up with a script using

      float rightMoveHorizontal = Input.GetAxis("RightHorizontal");
     float rightMoveVertical = Input.GetAxis("RightVertical");

and also using

      Debug.Log("Right Stick --- Horizontal: " + rightMoveHorizontal + ", Vertical: " + rightMoveVertical);

to read the inputs. When the debug statement outputs, it always outputs negative 1 for horizontal, and 1 for vertical (assuming 1 because I have invert checked on RightVertical. )

When I push my right stick all the way to the right, horizontal turns straight from -1 to 1, with no decimals (as opposed to the left stick, which has decimals.) the same happens when pushing the right stick all the way down, vertical turns to -1.

My left stick works fine in unity, and my right stick works fine in any other games I've played, as well as http://html5gamepad.com/ which I just used to test if my stick was broken.

I've seen this asked in the forums a few times but no one ever has an answer, so hopefully I can be that one post that people find in google when they have a problem.

Thanks in advance!

P.S.

It's really tough to google "-1", which is why I substituted one of my -s for the word negative and tried to use descriptive language. Hopefully someone will find this in the future.

Edit: after significantly more hours of screwing around with the inputs, it turned out to be a driver I had installed for gamecube controllers called "vjoy", changing the Joy Num to something other than 2 (which was the vjoy input number at the time) fixed it, but I also uninstalled vjoy to get around this.

I'm assuming that 4 is the triggers on the vjoy version of the xbox inputs, and that's why it was only returning -1 or 1.

capture.png (24.4 kB)
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
-1

Answer by dogefromage · Jan 03, 2018 at 01:03 PM

THANK YOU SO MUCH,THANK YOU SO MUCH

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 Cambromius_Prime · Feb 20, 2018 at 01:45 PM

I had this issue and couldn't figure it out for the longest time. Luckily I was just being thick-skulled. When you make a new controller axis by increasing the amount of axes at the top of the settings it defaults the new axes to 1000 sensitivity. This is what was causing my strange outputs.

Also, don't mix up your axes.

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 chassets · May 03, 2018 at 06:58 AM

Had the same issue, I was also using vJoy - opening the vJoy config options an unchecking "Enable vJoy" did the trick.

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 astracat111 · Jan 02, 2019 at 11:25 PM

I had to set both 4th and 5th axis sensitivity to 1. In fact, just use 1 sensitivity for everything, it seems like Unity and Windows 10 were both designed to use the Xbox One controller.

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

11 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

Related Questions

C# Get Xbox One Controller Analog Sticks, Triggers and D-pad 2 Answers

Multiple Cars not working 1 Answer

How Do I See If The Analog Stick Is Not Being moved? 0 Answers

Distribute terrain in zones 3 Answers

C# Xbox One Controller Left Analog Stick Z axis Rotation 1 Answer


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