If you want a widget to only show in a small spot in unreal engine, this is how. When a player goes onto a certain spot, the widget will show, and when they leave, the widget will hide.

To do this, I am going to use actors. So, first thing to do is crate an actor in your unreal engine project. Right click on the content area, select blueprint class, and pick actor. You will also need a widget. Right click, hover over user interface, and pick widget. Open your widget, and do whatever you want in it. It is what is going to show when the player is in the spot that you want.

Go to your actor, and press the green add component button, and select box collision. Go to the event graph while you have your box selected, and search for add on actor begin overlap. From there, search for is valid. From the not valid, crate widget and select the one you made before, and then promote that to a variable, and add the variable to the viewport. Bring the variable you just made to the is valid node, and from is valid, go to the add to viewport node you just made. It should look like the picture below

After that, we now want to hide the widget when the use leaves the area where we want it to show. To do this, select your box collision in the top left corner again, and from there search for the add actor end overlap node. From there, get all widgets of class, and select your widget, then remove from parent, and plug the found widgets into the remove from parent node. That should look like the picture below.

That’s all! If you have any questions, leave a comment.

5 thoughts on “How to make a widget show in a specific spot in unreal engine”
  1. Hi. i was wondering if maybe you can help me on how to make a widget or image pop up when i click on an actor. i am blowing up my brains on this.
    i would apreciate your help very much!!

    1. Thanks for the comment. I would like to help you, but please give more explanation. Is your game 2D or 3D? Do you want it to be like I have my mouse locked to look around the map, and when I click while looking at the actor you want, it shows the widget? Or something else? Sorry about that. I will try to make a post/ video about this upon your reply.

      1. thank you for your help. im kinda new on unreal. so i wil try to explain it the best i can.
        the project is 3d. its basically a product stand in a virtual expo. so what i need is that when click on the product which is an actor holding a 3d geometry with a texture a plane with a texture pops up next to the clicked actor.
        i am using the mouse to rotate and the arrows to move the first person player.
        i made some conections in the actor blueprint so when the mouse is over the object the texture changes and the object gets a highlight.
        Thans a lot!

        1. Alright, thanks a lot. I will start to work on it now, and I will give you the link to the post when it is ready. Just to confirm, you want it to be so that when I click on the actor in the scene, it spawns a 2d plane next to the actor? Let me know if I got it wrong.

          1. yes thats it!
            i have an idea im gonna try, puting the plane inside the actor and call a function of visibilty
            i hope it works!
            thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *