x


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());

}
more ▼

asked Mar 07 '11 at 11:16 AM

pretender gravatar image

pretender
497 121 134 145

It works fine with inertial scrolling on my multitouch trackpad. Here's something you might like: http://unity3d.com/support/documentation/ScriptReference/Mathf.Clamp.html

Mar 07 '11 at 12:21 PM Jessy

Works fine for me too, on MacBook Pro 2010 trackpad.

Mar 07 '11 at 01:39 PM Zib Redlektab

I have a Rapoo GX10 mouse attached to a MacBook 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 minutes of twiddling, no freeze. However the numbers were getting increasingly complex. 1.199999999 etc.

Mar 07 '11 at 03:18 PM dissidently
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x986
x76
x62

asked: Mar 07 '11 at 11:16 AM

Seen: 1292 times

Last Updated: Mar 07 '11 at 11:16 AM