Hi everyone,
I’m making an open world type game on UE5. To improve the user experience, I wanted to add a button above the interactables when the player is in range (see screenshot).
I started by making a collision sphere that detects when an interactable is in range but I’m stuck displaying the button above the object.
The game is in cpp but if you have an answer in blueprint I would be really happy
Thanks
You’ll want to download the image you want to be displayed.
Next you will set that image as the texture for the widget, and you’ll want to place that where you’d like using the viewport.
Once you have it set where you’d like, click on the widget component and go over to details, and check “Hidden In Game”.
Then, once you get within the collision (which I assume you have in place for the interact button), Enable Visibility on the widget “TRUE”, and using OnCollisionEnd use another Enable Visibility node and set it to “FALSE”.