Detect if a mousewheel is scrolling and what direction it is scrolling

How can i do this? Any ideas? Thanks

2 Answers

2

Try this:

if(Input.GetAxisRaw("Mouse ScrollWheel") > 0)
{
    //wheel goes up
}
else if(Input.GetAxisRaw("Mouse ScrollWheel") < 0)
{
    //wheel goes down
}

Did it work?

I didn't try it, but after doing some research it should, thanks! @smirlianos

Didn't work for me..

Looking at the script reference is a great value: Input.mouseScrollDelta

Hey @SkaredCreations ! Unfortunately i already looked and thats why im posting. Do you have any ideas?