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
3
Question by LukaKotar · Oct 27, 2013 at 08:01 PM · differentmousewheel

Mouse wheel sensitivity different between platforms

Hi.

I am working on a game, and it requires the use of the mouse scrollwheel. I am working on it on a Mac, and it appears to work exactly as I want it to. However, when I try the game on Windows, the mouse wheel seems far less sensitive.

I set a float variable to Input.GetAxis("Mouse ScrollWheel")*60, and check if it is greater than 40. Mac I am able to reach the if statement, but using the same mouse in Windows, I spin as much as I can, and cannot even get close to 40. I even tried multiplying it by 400 instead of 50, but got very similar results.

How could this issue be fixed? Anyone experienced the same issue?

Thanks in advance

Comment
Add comment · Show 7
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 trs9556 · Oct 27, 2013 at 08:09 PM 0
Share

I develop for mobile so I have never came across this, nor do I know how to fix this; but for a solution you can use the #IF UNITY_STANDALONE_WIN and #IF UNITY_STANDALONE_OSX to make two different if statements. $$anonymous$$ake the mac one your if 40 statement and then find the equivalent value for windows to match what you want it to do. I would also do a #ELSE if statement just in case you publish to any other platform and forget to add it to the if statement (like Linux or webplayer) to act as a fail safe.

avatar image LukaKotar · Oct 27, 2013 at 08:14 PM 0
Share

I know what you mean, and I did think of doing that before. But it just doesn't work in my case. I need to check if it is greater than 40 because it also makes a visual difference. I need to bring the mouse wheel axis to the value of 40 or grater. Doing that means wasting more hours by restarting my computer and copy/pasting the game to an USB stick over and over again.

avatar image NutellaDaddy · Oct 27, 2013 at 08:24 PM 0
Share

It could be due to the sensitivity to the mouse itself or the mouse scroll wheel, but I don't think it would effect it as greatly as you are implying.

avatar image supernat · Oct 27, 2013 at 08:26 PM 0
Share

Windows has a setting for the mouse that allows the user to control how sensitive the mouse wheel is. I usually set $$anonymous$$e to a value of 3 for instance to make websites scroll faster. Normally, you can request the sensitivity value in the windows API, so I would be surprised if this value wasn't something Unity allows you to query through the scripts, maybe have another close look at the input and mouse script references. Also, are you looking for a change of 40 units from one frame to the next? What happens if the game runs slower or faster? What I would do, though this may not fit into your architecture, is keep a running total of the scroll value. So if they scroll forward five times, you add the difference scrolled each time until it hits 40.

avatar image trs9556 · Oct 27, 2013 at 08:29 PM 0
Share

Well it would require more work, but rather than blindly multiplying it by x and keep doing guess work, take away the guess work. $$anonymous$$ake a gui component and show what the scroll value is. From there you can easily see what you need to multiply it by. GUI.Label(new Rect(5,5,Screen.Width,Screen.Height), "Scroll value Is: "+FLOATVARIABLE+" || Times 100: "+(FLOATVARIABLE*100));

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by MasterTim · Oct 27, 2013 at 09:13 PM

 Var mousewheel : int = 0;
 If(Input.GetAxis ("Mouse ScrollWheel")> 0){
 mousewheel = 1;
 } else if (Input.GetAxis ("Mouse ScrollWheel")<0){
 mousrwheel = -1;
 } else {
 mousewheel =0;
 }
 
 Inset mousewheel to your line and the multiplier
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

20 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

Related Questions

change tiltshift distance with mousewheel 0 Answers

multiplayer: Change level in 2 different times (first server after player) 0 Answers

Question about mipmapping and downscaling 0 Answers

Use multiple NavMesh ? -1 Answers

mousewheel tilt 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