Scroll Wheel not working on Mac

When i am working on my Mac i am trying to implement a scroll wheel zoom function. Script is fine but the scroll wheel is not detected. I was originally using my Magic mouse but then read that it was not supported with the scroll wheel function. So i bought a Logitech mouse Mx 620 or something. And i still have the same problem. I can scroll in the editor windows but in my app when i hit play it does not work. If i choose a different axis then it works like X or Y but not the scroll wheel....

Q

Are you sure the "Mouse ScrollWheel" axis is defined in the inputmanager?

And make sure you use the exact name of the axis. If you could provide us some code (like Alec already mentioned) we can eleminate some error sources.

ps. i don't have a mac and therefore can't reconstruct your problem.


edit:

try something like this to test if you even get something back.

//C#
void Update()
{
   float scroll = Input.GetAxis("Mouse ScrollWheel");
   if (scroll != 0.0f)
      Debug.Log("MouseScroll: " + scroll);
}

//JS
function Update() {
   var scroll : float = Input.GetAxis("Mouse ScrollWheel");
   if (scroll != 0.0f)
      Debug.Log("MouseScroll: " + scroll);
}

If you don't get any logs, it's probably something wrong with the hardware / implementation of the OS.

Ok so my answer for this question was to uninstall the Logitech drivers and use SteerMouse to get full control of my mouse settings...

But really i think there is an issue with Unity and Logitech drivers as my mouse worked for everything else on my mac....

Q

I have the same problem on my mac. Trackpad works fine, mouse does not.

I am still having problems with this. Any answers? I made a test project like suggested and got scroll input to work, and compared the Input settings between the projects but found nothing different. What is happening? I compiled a project, didn’t help, although using the trackPad did work as scrolling input. funny. must be a hardware thing. Funny thing too, when i first started working on my project today, I actually got mouse scrollwheel input just fine. I modified one of my scripts and then scrolling disappeared.

I had the problem but I think you guys might have put

Input.GetAxis("MouseScrollWheel");

in there. It is supposed to be

Input.GetAxis("Mouse ScrollWheel"); 

There is a space between the Mouse and Scroll.

Looks like this problem is still not fixed.
Both of the following methods do not work on OS X in Chrome, Firefox and Safari in the Webplayer:

  • Input.GetAxis( “Mouse ScrollWheel” )
  • Input.mouseScrollDelta

Is there any Bug ID? I can’t believe this problem still exists after years.

doing programsetting → inputmanager → reset fixed my issue perfectly on my mac ! workable!