- Home /
Question by
iamthecoolguy11 · Oct 24, 2013 at 03:55 AM ·
inputinputmanagerscrollscroll-wheel
how do i set up the mouse wheel?
I can never find a straight up answer to this question but can you answer it like this.
Negative Button = bla
Positive Button = bla
Alt
//then the rest of it
this is the script line that is using it if you're wondering
if (Input.GetAxis("MouseScrollWheel") >= 0.2 && ArrayNum <= MaxArrayNum)
thanks in advance
Comment
Best Answer
Answer by yogee · Oct 24, 2013 at 04:32 AM
this will give some idea
var e = Event.current;
if (e.type == EventType.ScrollWheel) {
if (e.delta.y < 0)
print("Scrolling Down");
else
print("Scrolling Up");
}
Actually, the original idea of using the input manager is better than hard coding the controls, because then players can modify and configure.
See here how to achieve it: http://answers.unity3d.com/questions/13485/implementing-the-scrollwheel.html