Mouse scrolling

Is it possible to detect whether the mouse wheel is scroll up or down?

1 Like

You can use the MouseWheelDelta() expression on native platform, it doesn’t work in HTML5.
To use it, just go to Other->Compare two expressions and enter

Expression 1

Sign of test

Expression 2

enter 1 to check if mouse is scroll up or -1 to check if mouse is scroll down

1 Like

Don’t use equal for that, just compare with 0 because it can be greater than 1 or less than -1.

I thought the expression return 1 and -1 only depends on the direction of scroll.
I mean I tried and doesn’t seem to effect how many times I scroll up or down the expression always returns 1 or -1 :confused:
What am I missing?


Ah I see. I have just tried < 0 and > 0 and sometime it does return 2 and -2 but since every scroll is count, 99.9% of the times it end up with 1 and -1, so it should be not a problem unless you really do want to scroll the wheel only a single time each time :stuck_out_tongue:

1 Like

Thanks guys!

Now for GD5

Get mouse wheel delta GD5

1 Like