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
0
Question by pretender · Mar 07, 2011 at 11:16 AM · mousescrollwheel

people using macs please help (mouse scroll wheel test)

i have a problem with mouse scroll...it was reported to me that mouse scroll on macs does not work, in fact it works for some time then it stucks...can somebody verify this to me?

here is the link to the build: http://bookjungle.com/TESTS/scroll.html

also it seems that it does not calculate properly, in the Input settings i have sensitivity set to 0.25 but radius updates in 0.1 increments. is there efficient way to make sure values are correct and in appropriate format?

here is the code:

var radius : float=2.0;

function OnGUI() {

 //GET MOUSE SCROLL WHEEL AXIS VALUE (RANGE -0.5 TO 0.5)
 var scroll : float=Input.GetAxis("Mouse ScrollWheel");  
 Debug.Log(scroll.ToString());

 //CALCULATE RADIUS BASED ON MOUSE SCROLL WHEEL AXIS
 radius+=scroll*0.1;

 //LIMIT RADIUS      
 if(radius>=4.5){

     radius=4.5;

 } else if(radius<=0.0){

     radius=0.0;

 }

 //DISPLAY VALUES 
 GUI.Label(Rect(5,5,250,20),"Mouse ScrollWheel Axis: " + scroll.ToString());
 GUI.Label(Rect(5,20,250,20),"Radius: " + radius.ToString());

}

Comment
Add comment · Show 3
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 Jessy · Mar 07, 2011 at 12:21 PM 1
Share

It works fine with inertial scrolling on my mul$$anonymous$$ch trackpad. Here's something you might like: http://unity3d.com/support/documentation/ScriptReference/$$anonymous$$athf.Clamp.html

avatar image Zib Redlektab · Mar 07, 2011 at 01:39 PM 0
Share

Works fine for me too, on $$anonymous$$acBook Pro 2010 trackpad.

avatar image dissidently · Mar 07, 2011 at 03:18 PM 0
Share

I have a Rapoo GX10 mouse attached to a $$anonymous$$acBook Pro running OSX 10.6.6 and tested your Unity Player file in the latest Opera. (Safari wouldn't open it) I also got the .1 increments you're talking about. But after 2 $$anonymous$$utes of twiddling, no freeze. However the numbers were getting increasingly complex. 1.199999999 etc.

0 Replies

· Add your reply
  • Sort: 

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

No one has followed this question yet.

Related Questions

Mouse Wheel Zoom code not working like it should 1 Answer

how do you make a Mouse ScrollWheel script 1 Answer

Disabling mouse wheel when user is scrolling ScrollView 3 Answers

Making the camera zoom in and out? 1 Answer

Character Zoom in and out 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