Widget opens once

I have made a widget with a button close (sluiten)
If my pawn overlappes a trigger box, the widget is opened with the controller grip-Left.

That works once, but after hover on button close, the widget never appears again with the Left-grip button on the controller…

I have set the BP on event-tick.

339808-button-close.jpg

Anyone an idea what’s going wrong?
Thanks in advance!

You’re hiding a widget but showing a root component of an actor. This means that the widget is still hidden when the actor is made visible. A widget and an actor are 2 separate entities with individual visibility settings.

You will need to choose:

  • either show / hide just a widget
  • or show / hide the entire BP Color actor
  • or show / hide a widget component (if you’re using one)

Is the actor using a widget component? How is the widget created?

Thanks for the quick reply!!

The BP color actor is using the widget component. The widget is made by simply new widget and then placed in the BP Color.

If I want to hide the entire BP-Color blueprint, how can I do that in the widgets BP?
Do I have to cast to the Color BP?

Thanks again, I set up the second BP nodes, see attachment, but it’s not working in my case…

The widget is set in the BP_Colormenu Blueprint as invisible, because I don’t want to show up the widget on beginplay.

What do I wrong?

The easiest way would be to show / hide just the widget:

If I want to hide the entire BP-Color
blueprint, how can I do that in the
widgets BP? Do I have to cast to the
Color BP?

  • don’t do anything in the widget, don’t hide self

Instead:

The widget is set in the BP_Colormenu
Blueprint as invisible, because I
don’t want to show up the widget on
beginplay.

As I said, do not modify the widget in any way. Otherwise we’re back to where we started - you said you, ideally, wanted to operate on the actor only, but now the widget is invisible.

Set the actor to hidden on Begin Play instead. Or simply:

339872-screenshot-1.png

Now it will not show up when the game starts but can be shown with the controller. Its button will the actor - do not that the current button event is for Hovering rather than Clicking - but this may be intentional, for course.

There is still something wrong in my setup. I set the widget in the BP actor to visible and hiden in game. In the editor I now see the widget, not in VR… so far so good.

But the Left grip doesn’t fire up the widget.

Sorry for the questions, I am quite new to Unreal!

No worries, the engine is a beast.

How are the widget components settings, like this:

If you put a Prints String node after the Grip fires, does it print? Is the widget component in screen or world space:

339912-screenshot-7.png

  • what is the chance that as soon as the widget shows up - the onHovered immediately hides it? Perhaps disconnect it for now to test things out?

Thanks for the quick replies every time. You are my Hero!!

I restarted the engine and it now all work perfectly!!! I am a happy man.
And indeed the engine is in the beginning overwhelming with all those nodes and functions.

But this part I now understand and it will be used in the future…

Thanks again!