I’m using my mouse to interact with 3D widgets. I’m able trigger hover states for the widgets from the mouse pointer using the Widget Interaction component. However, I haven’t been able to get the widgets to register clicks.
I’ve tested that the widgets respond to clicks in 2D mode (with hardware input enabled). So I think the problem is related to how I’m using the Widget Interaction component.
No need for a widget interaction comp in this case. Hardware input enabled is all you need (widgets need their Visibility set properly, ofc).
However, I haven’t been able to get the widgets to register clicks. […] I’ve tested that the widgets respond to clicks in 2D mode
How are you trying? Perhaps it’s the testing method’s fault? It’d be strange, indeed, to get a hover but not the click. Do elaborate.
Hardware Input lets the device communicate with the widget directly. The Widget Interaction Component is like a software abstraction layer that simulates what the device is doing. The most straightforward implementation in an input-enabled actor:
The world-space widget component needs no hardware input in this case. We’re simulating it with a trace. And since we get to simulate, you can take it places where normal input cannot go. For example, you cannot (easily) interact with buttons using the keyboard. Now you can:
I’ll mash X and tell the widget to treat it as if it was a mouse click. The button will never know and fall for it.
For anyone else: I had to add an Enable Input node to the same blueprint actor that contained the widget interaction node.
My mistake was assuming that it was sufficient to put the Enable Input node in the level blueprint and I didn’t realize it was an actor specific parameter (unlike Show Mouse or Enable Click Events, for example).
The option to check Receive Hardware Input on the widget instances was something I had tried before and worked but was not viable for the needs of my game.