Make UI block Mouse input

Im making a point and click game using the top down template and blueprint. I have a UI that is framing my game, I dont want the player to be able to click behind the UI frame and make the character walk there. Is there a way of making the UI obstruct the mouse collision with the world? Im using a png of a frame

Hello @ShadowCopyCat ,
You can use Set Input Mode UI Only when creating the widget, combined with Show Mouse Cursor enabled. This will focus the input on the UI and prevent normal gameplay input while the widget is active.

Once you close the widget, switch back to Set Input Mode Game Only and disable Show Mouse Cursor to restore full player control.

Hope it helps!

I still want the player to be able to play the game just limit the gameplay field

Hello again ,
Could you send a screenshot of how you set up your Widget Blueprint with the frame? If possible, also show how the issue looks in-game. It would help to know whether your camera is fixed or if it moves with the player.
I’ll be waiting for your reply!

actually there is an easy way, create a mainhud widget that is a canvas and the parent of all you child widgets, in the mainhud override OnMouseButtonDown and reply Handled. this means if any other child widget doesnt handle the button it will click through the the mainhud and be handled there so you have a central authority

its a fixed camera

I made a solution, not optimal, but I just arranged a bunch of invisible textured buttons that wont do anything beside blocking the player interaction

so basically anything that dosent have a greeen square is where I want the player to be able to interact with the game itself

It’s a good solution either way. You could also implement it using a Border, similar to how you set up the buttons, or go with the option Auran mentioned above. As long as it works correctly, it’s perfectly valid. Happy developing!