How to show up information billboard in scene when player is 20m in front of a building ue4 ue5

Hello,
i want to show up information billboards in my level when the player is 20m in front of a building. So he knows what kind of building it is.
Has someone a blueprint snippet or a tip for a tutorial to this topic?
Thanks in advance for any help!
Einar

You can raycast to the building from the character and if it’s close enough, spawn a widget.

unreal has the content examples project full of small stuff like this. like how to show something when you get in certain place. and many more stuff. fully documented and working.

make sure to get the correct version as there are two projects one for the 4.2 and one for the 5.0

Hello Monsterag,

One of the samples Dorusoftware might be referring to is this Blueprint sample It has a fancy pop-up that dynamically grows when you get close to it.

I think the best method would be to use the Distance (Vector) node


In that snippet I set up a timer since something like that does not need to be checked every frame. Hope that helps!

Those solutions all require the user to “know” what the buildings are.
In general, you want a de-coupled system.

The easiest way to do this, is to put an overlapping collision box around the building, and extend it out 20 meters. Make it overlap only pawns (or overlap only player, if you have custom collision channels.)

If you want the notification to be part of UI:

In Actor Begin Overlap, you can get the controller of the overlapping pawn, and cast that to your player controller, and call some custom “Add Notification Text” function on it. Or use an interface with that kind of function. The function probably takes the actor that’s adding the notification, the text to display, and the preferred position to place the sign (if you have one.)

In Actor End Overlap, you similarly remove the notification text again, presumably by calling some function that removes all notifications for the given notifying actor.

In the player controller, you keep a list of active notifications, and update some UI widget with the text/s of the notifications. When the list changes, update the widget that displays the text/s.

If you instead want the notification to be floating in air:

Set up the overlapping volume as per above, but also set up a Widget3D component that contains the text to display. Make it hidden (not visible.)

In Actor Begin Overlap, if the actor has a player controller that’s a local player controller, make the component visible. Remember which actor caused it to show. (You can also move the widget component to be somewhere between the actor and your building, if you want)

In Actor End Overlap, if the actor that’s ending overlap is the one that cause the widget to show, mark the widget as hidden again.

1 Like

thanks to you all. I will try the example from astrotronic and also walk throu the content examples. thats a good start.

Thanks for the example. with your examplecode and the blueprintofficelevel i think i can manage it. I got it roughly working now :slight_smile: