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 /
  • Help Room /
avatar image
0
Question by darkhog · Jan 16, 2016 at 07:54 AM · camerarotationgamepadissuesanalog

Right thumbstick (Rz) drift - camera moves on its own

Hello, I've encountered quite common problem where camera wildly rotates on its own when joystick/gamepad is plugged while trying to make camera controllable with it. The problem seem to touch only right stick's left-right axis (Rz) and not any other.

The analog stick in question works fine in non-unity applications, such as emulators, so it is definitely not a hardware issue. Any suggestions how to fix it? The goal is for the player to be able to just use gamepad without any previous configuration, left stick for movement, right for the camera.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by SgtGhostHeart · Jan 19, 2017 at 04:47 PM

Set dead zone to 1 or to size that will work for you on your project, keep making it go up until it stops moving.

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 marakusa · Dec 22, 2017 at 01:46 PM 0
Share

I set it to 0.001 and it worked to me!

avatar image
0

Answer by PLANET-HEAD · Feb 16, 2016 at 04:00 PM

I'm doing the same thing and getting this exact same problem as well... All other axes are working just fine.

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 PLANET-HEAD · Feb 16, 2016 at 04:11 PM 0
Share

I seem to have fixed this issue my end. I was adjusting the sensitivity on the input end rather than in the inspector for the FPScontroller. Setting the input sensitivity to 1 or below fixed it and then in the First Person Controller script under $$anonymous$$ouse Look I could edit the actual sensitivity there. Hope this solves it for you :)

avatar image
0

Answer by 686InSomNia686 · Feb 21, 2017 at 10:08 AM

Hi, I have modified the MouseLook.cs script from the FPSController to cut the parasite positions. When the joystick is static, I force the rotation to Zero. Add that to the script after the line 33-34 :

             float yRot = CrossPlatformInputManager.GetAxis("Mouse X") * XSensitivity;
             float xRot = CrossPlatformInputManager.GetAxis("Mouse Y") * YSensitivity;
             //Smooth static position of the View Joystick
             if (Mathf.Abs(yRot) < 0.1f)
             {
                 if (Mathf.Abs(xRot) < 0.1f)
                 {
                     yRot = 0.0f;
                     xRot = 0.0f;
                 }
             }

Best Regards, Clément

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

50 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

Related Questions

Trying to make my camera rotate using gamepad 0 Answers

Recognize when ever camera looks up and turns back down 0 Answers

How do I stop the camera from going farther away while I am moving the player and rotating the camera at the same time? 1 Answer

Smooth Look at... 2 Answers

Mouse Look Script Not Working 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