Cannot cast From 3D UMG Widget to an Actor successfully.

I am trying to call an event in an Actor blueprint from pressing a button in a 3D widget blueprint which is on said actor.

For arguments sake i want to press a button on this 3d Widget and set an component to be visible/invisible.
I have tried calling a custom event by using get all actors of class on event construct, setting it as a variable and then calling from that variable.
I have also tried creating a blueprint interface to interact that way, that also does not work.

I understand that 3d UMG widgets are in experimental however if i fire this event from either event tick, or event construct it works fine.
I need it to work on a UMG button press.

Any help would be appreciated.

you already check if your button work when you press it?

Is the button in world space, or screen space? If it’s in World Space, check the interaction distance. You may be too far away to click the button.

I am in world space, the distance is at 100000 which appears to be the maximum, I am not actually using a character at all, i am in a blank project with just the default pawn, as soon as the game begins i switch camera to my BP in question using set view target with blend.

Still looking for assistance with this matter.

Reference your Actor (the one that holds the 3D widget) in the WidgetBP (Like add a variable, of the initial actor class, make it public) then on begin play or construction you set this variable in the BeginPlay to “Reference to self” from the Actor BP. Now simply use the Reference in the WidgetBP to do whatever you want with that

First thing i tried,

After further experimenting it appears that the button is not getting pressed at all, i, along with the original blueprint set the level blueprint up to have this widget as a main gui alongside the 3d widget, the button actually moves when it’s being pressed and as it’s set up to only set the visibility of 2 different 3d Widgets it works correctly.

So to elaborate it doesn’t seem that the button is even pressing, i have set show mouse cursor to true along with allowing click events from my player controller node, this shows my cursor but the button on the 3d Widget is not moving, meaning its not even being clicked at all.

Sorry if that’s confusing.

I’m trying to use the mouse on a 3d Widget right now in world space, and as far as I can tell, it’s not working. The mouse click works if the 3d widget is in screen space, but if I set it to world space, it doesn’t work.

Some more information about this:

https://forums.unrealengine.com/show...et+mouse+click

Looks like there are some workarounds, but it’s essentially like redoing the UI entirely just for it to be in 3d… Which is less than ideal. I’m guessing that this will be fixed one day in UMG itself (allowing mouse interaction with non-screen space widgets).

We support mouse interaction with 3d widgets. There’s a bug with pivot though in 4.7, try zeroing out pivot and see if it’s clickable.

I gave it a try, and it’s working indeed.

Thank you!