UMG - GetWheelDelta broken?

Am I doing something wrong or is the GetWheelDelta broken in 4.51? I have a border, and on the OnMouseMoveEvent I have GetWheelDelta hooked up to the input node and a Print String Node. But when running the game I get that WheelDelta is 0.0.

But how do I get access to the OnMouseWheel in UMG blueprint? I have set my inputmode to UIOnly?

Wrong event, OnMouseWheel is what you want, but I could see why it might be confusing.

Cheers,
Nick

Oh, you bound a function to OnMouseMoveEvent on a border, yes? OnMouseWheel is a function you override on the user widget itself.

Thanks I have achieved the effect I wanted, but is there a way to add new slots under Events in the detailspanel? As you can see I have bound OnMouse Wheel to the OnMouseDoubleClick slot.

Very confused - that means the mouse wheel function is going to be called on double click on the border…

What are you trying to achieve with this; I noticed you’re handling all the events on the border, what’s the goal?

Well I may be doing things a bit different than what the intention was, since I am very much a novice. The idea behind the whole UI is to build a surveillance UI where one player is able to change between security cameras, switch to nightvision, move the camera up,down,left and right and zoom the camera. I have everything working even the zoom. When I mousewheel up, I zoom in by 15 degrees, when I mousewheel down I zoom ouy by 15 degrees. I figured out that by right clicking on OnMouseWheel in the My Blueprints Panel I could implement the function but I didn’t know where to go from there (Tutorials will be very much appreciated) so I just tried to see if I could bind to the border and voila it worked. The function is also fired when I double-click which offcourse is a bit of a side-effect. The reason I have all my functions on the border is I don’t know how to do it otherwise. Buttondown controls the movement of the camera, when you hold the left mousebutton down over the screen it activates moving the camera around. On mousebutton up it releases the camera so it does’nt move. On mouse move event it registers cursor movement and the camera moves. I have taken screenshots of my functions as well as the functions they call on my securitycamerablueprinteactor.

Hi Nick, thank you taking time to explain this to me, but I am still a bit unsure on how to use/call the functions once I have implemented it, in the new widget blueprint. Are there any general blueprint videos that explain this you could point me to?

Ah I see, neat :slight_smile: So the way I would go about it would be to make the control where you’re doing all the mouse actions its own widget blueprint, then you can override any of the low level functions. Right click on the functions i mentioned in my first response, and select Implement, that will override it. Instead of trying to do everything in a single widget like you’re doing now. Border doesn’t quite expose everything, just a few things to reduce the number of custom widgets you need to write for one offs, but yours sounds like it needs all of those events and more.

Hi again, I get it now. When I implement the function it is implemented on the new widget, then I can insert that widget on my main UI widget and the functions will work when the mouse is over the widget. Thanks again.