How do I get scroll box to scroll with mouse wheel in game?

Hello everyone! I need your help my fellow devs!
Okay, so I want to make a chat that uses a scroll box to scroll to previous messages.
Here you can see the phone screen that renders a widget to a material dynamically and a test widget that consists of a scroll box and some buttons to test my scroll.


And here is the image in which I’m going to put the scroll box inside to add the messages

The problem is that after I move I can’t scroll with the mouse wheel

The only “solution” which is not really a solution is to show the cursor as you can see here, but that doesn’t work for me, because I have to click with LMB OR RMB to even look around.

PLUS for mouse wheel to work the cursor NEEDS to be on top of the widget. I want to scroll in game for example when moving and looking around.

I want to scroll with my mouse wheel whenever and however I want in-game to check my previous messages without having mouse cursors appear or whatever. I even considered adding a wheel axis input action but I dont know how that would work since there isnt something to scroll while you are in the desinger page of the widget blueprint.

Any ideas? If you can help me you get a free cookie

One of the solution will be to do a manual scroll:

Widget Message BP:

Character or Controller BP:

You will need to add some condition ofc to check if your widget is valid. :innocent:

Thank you so much! That works! And the way to make it smooth its just that I check the animate wheel when scrolling correct?

1 Like

You can set the animate boolean in it detail panel:

To add a smooth effect, you might need to add a timeline or lerp with the MouseWheelAxis float value.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.