If I follow the “Creating 3D Widgets” tutorial in the docs to the letter, I get these results;
- Works fine in the 4.12.5 Editor
- No click or hover events in game packaged from 4.12.5
- No click of hover events in the 4.13.1 Editor
I have found various suggestions, such as changing collision channels, setting the widget blueprint’s pivot to 0,0 and enabling click+hover events on the player controller, but my UI is little more than a static image of itself.
Everything is set up like described in the docs. Additionally, I now call this Blueprint function from BeginPlay()
Interaction distance is sufficient (and in 4.12.5 it worked – at least in the editor).
The OnHover/OnUnhover/OnClick events simply don’t fire anymore since 4.13.1. What could be wrong?
I found a possible explanation. Epic changed the way 3D UMG inputs works in 4.13:
It seems that I now need to create a widget interaction component and forward input through this component. But to what should I add this widget interaction component? I don’t have any pawns or characters in my map since it’s a menu screen…
Attaching a “Widget Interaction” component to my menu camera and changing its interaction mode from “World” to “Mouse” at least got hover events working again.
Though I wonder if the “Mouse” setting breaks VR controller input (since the controller would be an object with an orientation within the world).
Also, clicking doesn’t work.
If anyone wants to take a look, I uploaded an example project here: https://ufile.io/95442
EDIT: Nevermind, I probably just have to forward mouse button events manually from my player controller to the widget interaction component.
i was just going though the same thing here is some video tutorials that could help 4.13/4.14 Widget Interaction Component - YouTube
he also covers the VR aspect that it looks like you need