- Home /
The question is answered, right answer was accepted
Apple Mouse Scroll Wheel
So I'm using one of the new Apple mouse's (or is it mice? Was never sure...) which doesn't have an actual physical scroll wheel, but you just slide your finger across it to use it like a scroll wheel. I tried using it along with my zooming code and Unity doesn't seem to register it. Debugged it and its not running. I'm wondering if Unity supports these types of mouse's scroll wheel input?
Edit:
In fact, Unity's not registering any mouse input except for the mouse buttons.
What's your code look like? If the mouse works with Unity (i.e, if you can click on stuff) then I'd be surprised if Unity can't read it.
if(Input.GetButton("$$anonymous$$ouse ScrollWheel")){
player.Translate(Vector3.forward * Input.GetAxis("$$anonymous$$ouse ScrollWheel") * zoomSpeed);
}
Code's simple enough.
Oh never $$anonymous$$d, I figured it out! I have to check to see if the axis doesn't equal 0:
if(Input.GetAxis("$$anonymous$$ouse ScrollWheel") != 0){
Ins$$anonymous$$d of checking Input.GetButton().
Follow this Question
Related Questions
Erratic mouse Input.GetAxis values on OS X 0 Answers
Does anyone know how to determine whether or not a mouse is connected? 0 Answers
Need help on the 3ds max style camera control 0 Answers
I am making a 2d game and I want to make it where to can pick up bricks with your mouse 3 Answers
Detect Selection on EditorGUILayout.SelectableLabel 0 Answers