You do not need a Widget Interaction component for your mouse to interact with a widget component. The Widget Interaction component provides a simulation layer for the input.
Do you need a Widget Interaction component for something else than mouse clicks? Can you confirm this is not for mouse clicks?
i have a problem with the click on my buttons.
I know many people have this problem, but no thread helped me.
Button hovered works fine. Only the click does not work.
I have a plane with my 3D widget with 5 Buttons to switch to another cams.
Following option i have tried to fix it:
Do you need a Widget Interaction
component for something else than
mouse clicks? Can you confirm this is
not for mouse clicks?
You did not answer my questions so can you at least tell whether it’s safe to assume that your Input Action Interact is not a left mouse button but a keyboard key instead? Or something else?
As in, you’re pointing the gun at something and wish to click on a widget component’s button; or you’re using a camera / screen centre to guide the interaction.
I’m simply trying to understand what you’re trying to achieve. You’ve included a screenshot where you show the mouse cursor; if you’re after a classic mouse-widget interaction, you do not need an interaction component.
If you wish to point at something with the mouse and then use another input to simulate a click, then you do need an interaction component.
The above is without the interaction component as we can use the mouse, no need to simulate it. So the question is what else you’ve got there going on that could interfere?
If you’re clicking those, what is the InputInteract for then? One thing that could prevent an interaction like this but still display the Hovered behaviour is Input Consumption.
If you’re Left Mouse Clicking those buttons, do you use the Left Mouse Button for anything else, in another blueprint, perhaps in the Level Blueprint? The LB can easily steal priority and consume input.
You could test it by switching to Input Mode UI Only; this will prevent the player controller from consuming input but will still allow you to use widgets.
The behaviour I demonstrated in the animation is the default behaviour with just the Receive Hardware Input enabled. You need nothing else to interact with a 3d widget’s button + mouse click. Perhaps you’ve modified the behaviour of the button itself?
I do not know what else you’ve got going on in your project, what other interactions you’ve scripted. Consider testing it in a clean project:
create a widget with a button
embed it in a widget component and enable Receive Hardware Input
As I said, test it in a clean project with minimum setup. No dispatchers, no interfaces, just a Print String to confirm things are working.
From the picture you’ve attached, how the heck is anyone supposed to figure out what else you’ve got going on. Something is not working, keep narrowing it down until you identify the culprit.
You originally said:
Only the click does not work.
If you put a print string above, does it Print? Because that would mean that the Click does work and we’ve been having this exercise for nothing… In which case you’d need to look at the way you register the dispatchers rather than at how input is processed.
That’s great. Thanks for testing it out. To clarify: you can observe the hover behaviour (button reacts to cursor moving over) but when you click, nothing happens, right?
no the hover behaviour dosnt work, because the “Widget Interaction component” is deleted.
Without “Widget Interaction componen” i dont get the hover behaviour.