Yet for some reason, my widget won’t register user’s input at all? My widget contains a button that checks for OnClick and OnHovered and neither trigger.
(Attached is the code checking for the reaction, and the code giving the reaction.)
This setup seems fine as is. It’s something else that has not been addressed.
Things to double check:
can the input tunnel to the button - does the widget hierarchy allow it via the Visibility setting? As in, place a button in a border, set the border to Not Hit-Testable and the button is inaccessible all of a sudden. We do not want that. Perhaps test it with just a button and nothing else in the hierarchy.
Interaction Source: World - shouldn’t this be set to Center Screen? Is this for an FPS?
So my widget has a Canvas Panel with a child Button. CanvasPanel USED to have Visibility: Not Hit-Testable(Self Only). I quickly changed that to Visible in hopes that was it. But no change.
The widget has NOTHING else besides Canvas Panel -> Button and I created a new widget, deleted the default CanvasPanel and set a button as the only and main child of the entire blueprint. Then checked for OnHovered and OnClicked and neither ran.
Interaction Source: World is correct, because my game is for VR and I want the player to be capable to click a button. (But I did try once setting it to center screen, but still no luck) That’s why the Event that runs the log Should Press detects the trigger. So the Widget Interaction Component is a child of the Motion Controller Component which is a child of a PlayerPawn so it looks like:
and I have the debug lines on the Widget interaction component, so I can see that the controller is pointing at the widget. AND the debug line just goes through the widget.
Hey, I might’ve found something. Like JUST found it seconds ago.
So my “main menu” for my VR game is INSIDE a inside-out sphere, when I took the player and the widget out of the sphere, it started working. Is there something like collisions that can mess it up?
Wanted to post here to say this bit of advice helped me out with a strange similar issue.
I had a 3d widget inside a cloned blueprint. I set the original blueprint to visible:false so that I could back out of my changes by simply deleting the new clone.
Turns out the invisible object’s collision was interfering with hardware input!
This is the second time the visible:false has stung me like this. It isn’t comparable to unity’s gameObject.enable/active flag…