x


Mac/Safari Mouse Input Bug?

I am experiencing a mouse input issue when I play my game with webplayer and Safari on a Mac.

I reproduced the issue on the first 3 Macs I tested with, so I wrote a small test script to investigate further. I find it hard to believe this wouldn't be a known issue, though.

Issue Description:

If both mouse buttons (left and right) are held down at the same time, only one of the two "mouse up" events will be detected. The first button's release will be detected correctly, but after the second button is released Input.MouseButtonUp(buttonNumber) will continue to return true.

How to reproduce:

  • play game in webplayer mode using Safari on Mac
  • Mac OS 10.6.7
  • Safari 5.0.5
  • hold down both mouse buttons (left + right)
  • release left button
  • Input.getMouseButton(1) continues to return true in Update() function

Here's my test script:

var isLeftButtonDown  : boolean = false;
var isRightButtonDown : boolean = false;

function Update ()
{
    isLeftButtonDown   =  Input.GetMouseButton(0);
    isRightButtonDown  =  Input.GetMouseButton(1);
}

function OnGUI () 
{
    var labelRectangle = Rect(100, 100, 200, 200);

    var msg : String = "";

    msg += "\n Left Button:    " + isLeftButtonDown;
    msg += "\n Right Button:   " + isRightButtonDown;

    GUI.Label(labelRectangle, msg);
}

I attach the above script to an empty GameObject in my scene and create a webplayer build. If I open that with Safari on a Mac the output confirms that something bizarre is happening.

Maybe somebody else can confirm this on their machine?

more ▼

asked Apr 29 '11 at 05:33 AM

jahroy gravatar image

jahroy
3.2k 14 18 41

It would be better if you submitted that as a bug report instead of posting it here.

Apr 29 '11 at 05:35 AM Eric5h5

It's actually not bad practice to ask here to confirm if it's a bug or a scripting error/machine error on his side. I cannot check it for you though, I'm on a windows machine.

Apr 29 '11 at 09:36 AM Joshua
(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:

x810
x337
x10

asked: Apr 29 '11 at 05:33 AM

Seen: 962 times

Last Updated: Apr 29 '11 at 05:46 AM