Button OnPressed

I will try one more time cuz its really important to me. Is it possible to fire Button event OnPressed when it is being overlapped by other actor in my game? I’m talking about 3d widget button that is in the game. Thank you!

One way to do it: create a *CustomEvent *in the widget and hook it up to the same bunch of nodes as the button’s OnPressed

Untitled.png

Ok, and fire this Custom Event when button is overlapped?

It doesn’t work

Short answer is; yes. But more information would be nice to help you achieve what you want.

If I’ve understood you correctly, you have a 3D widget in world space which you’d like to interact with? The Widget Component has overlapping events as well as OnComponentHit. You should be able to use either of those.

If a hit is detected and the actor is a child of the class you want, you can cast to the widget and execute a custom event. While I haven’t actually tried this myself, I assume this is how it would work. And assign the OnClicked event in your widget blueprint;

I think you are having an issue with obtaining a reference to the widget rather than firing an event. Can you confirm or at least show us a screenshot of your blueprint.
What Dealman suggested would work but you’d need to set up a Dispatcher which is actually somewhat more complicated.

This is Event Graph from Actor which has Widget component added to it:

This one comes from Widget with Button:

Custom event is fired (I get “BUTTON CUSTOM EVENT” notification) but OnPressed is not.

Do what I did in my first post.

I did, the custom event is fired but the button is not pressed (I know it because it should change its color and it doesn’t)

it prints the string but button doesnt change it color