Expose Mouse Wheel Delta

Currently we have only the capability to get the mouse wheel events in Blueprints (not UMG) as presses, but we do not get a delta value. Normally, platform APIs will expose a delta which is passed up via the hardware, to the driver and OS, then through whatever platform and code library stack that sits between the OS and the executing code.

This delta value is non-standard, so the actual result is usually undefined, but it’s normally proportional and the magnitude indicates the direction the mouse wheel was moved.

In UE4’s current implementation, one detent on the mouse wheel triggers one “press” event. This is fine, but it would be nice if there were an additional output that passed along the actual raw mouse wheel delta value.

we don’t? :eek:

haven’t looked for this or tried to use it in UE4 but have used this many times in the past

^^^ I want this! too! ^^^

I feel like there is a node for this, or at least there used to be, but it didn’t work. It never fired as an axis event for some reason. They may have just removed it altogether at this point.

after looking, the mouse wheel (up & down) is already in project settings under input, you can set it there, it will give the information that you set it to, as a float.

are you asking for the actual delta from the mouse itself? (maybe as an input node inside a BP?) I think the above would serve in a similar way just like a console controller would if you set it up that way, just use the event created in project settings.

the actual values you probably have to keep up with yourself just like handling controller input from a controller device.

Yes, I’m asking for the actual delta which is obtained ultimately from the mouse->driver->OS.

I’m already using the input settings in Project Settings to get a “pressed” event for Mouse Wheel Up and Mouse Wheel Down. The problem with the way UE4 is doing it now is the engine is not capable of telling me how fast someone scrolls. In other words, the presses do not trigger for every detent in the mouse wheel if you scroll very fast.

If you really quickly brush the mouse wheel so it moves several detents almost instantaneously, the result is the same as if you had moved only one detent because only one “pressed” event is triggered.

Needless to say, this makes creating a smooth experience with the mouse wheel almost impossible. I’m using it to zoom in and out and unfortunately, controlling how fast you zoom in and out by how fast you rotate the mousewheel cannot be made into a smooth experience with this kind of setup. It requires rolling the mouse wheel several times in succession rather than giving it one quick flick to zoom in or out.

Notice in your browser, if you give your mouse wheel a quick flick, the scroll bar will travel farther than if you just slowly move it one detent. That’s because they are registering the delta and doing something with it.

Mouse wheel delta IS exposed to UMG, just not the rest of the engine: UMG - GetWheelDelta broken? - UI - Epic Developer Community Forums

Alternatively, if the delta is not exposed, I’d like to have an event triggered for every detent in the mousewheel, if possible.