When using a Hud, I cannot click on any actor (ActorOnClicked, direct mouse events, Get Hit Results By Class)

Hello,

from the moment I use a “create widget node” with a “add to viewport node” inside the HUD blueprint, it seems that any hud is consuming the mouse clicks

I also tried “Get Hit Results By Class” and direct mouse events from the project settings, same issue, all mouse events are blocked

Even if I set the root component of the hud to hidden, even if I check that all events are disabled in the HUD

can someone explain to me what I am doing wrong ? how could I fix this ?

(I created a hud from the official hud documentation https://docs.unrealengine.com/latest/INT/Engine/UMG/QuickStart/2/)

thanks

Do you still see the Hud after:

Even if I set the root component of
the hud to hidden

The most common culprit for what you described would be the canvas eating up all the input - setting it to SelfHitTestInvisible helps here. However, this makes little sense if the root is already set to Hidden.

Do you SetInputModeUIOnly anywhere?

Yes but they are all disabled, and now for some weird reason, even if I disable the hud, the click events dont work anymore

so I have removed everything in my level but the player and the object I want to click on

I have set the default hud to “none” in game mode

I checked the right player controller was set in game mode and the click events were enabled

I am out of ideas

I created new empty project with a simple test and the click events work

why the f is it not working in my game… ???

So what happens if you do not create a widget? Can you then click normally?

there is no more hud

so I wanted to use the “migrate tool” to copy my assets to my new simplified project and it’s gone cannot find it anywhere …

there is no more hud

You mentioned HUD in the GameMode. Do you mean the class or the widgets - as they are very different beasts.

The usage of HUD class has been mostly phased out, there’s some functionality that’s not available anywhere else but you generally do not need to use it.

as I said, I removed so it’s not the problem…usualy I use a HUD BP that creates a Hud Widget

So do I. I use HUD class as a widget manager, and to draw lines in the viewport. It works well.

If you can’t click on actors with no widgets in the scene - it’s the actor collision settings vs controller - enable click events.

If you have a full screen widget, one of its elements might be consuming the input.

Nothing else comes to mind.

alright, so

1 I followed this one : Creating Drag and Drop UI in Unreal Engine | Unreal Engine 5.2 Documentation

2 I changed the mouse visibility of the main hud window programaticaly when drag start and disabled its visibility when drop is done

so the hud main window does not consume click events outside of the drag-drop operation