RedditPP Mascot

RedditPP

r/unrealengine • … • u/Olaxan

[QUESTION] Making pop-up key hints with screen space Widget Components -- a question about performance.

Hiya!

We're making a game with a decent amount of interactable actors; i.e. doors, buttons.

I'd like to have hovering keyboard help popups on some of these (*LMB: Grab*, that sort of thing). I'd like them slightly visible when the player is close and looking in the direction of the item, not just when the item is being hovered (as to draw attention to the items).

I've made a simple blueprint with a Widget component, which is set to *screen space*. The blueprint itself occasionally queries for the distance to the player, and sets the render opacity of the widget based on that. It's a timer-event loop, so it will "tick" more seldom if the player is far away.

The idea is to add this blueprint as a child actor to the various interactables.

Obviously this will lead to a decent amount of these child actors per level. Let's say a couple of hundred in a level simultaneously at absolute worst. The majority of these will "tick" at most every few seconds.

**My question is this:** Is this a sustainable method? Are there any tips on how to optimize this? Should I be worried about performance?

I find the Widget component documentation to be slightly lacking. A lot of options seem to work strangely when the widget is set to screen space.

Thankful for any advice! As if anything is unclear.

**Optimizations so far:**

- The BP:s don't have tick enabled. They have looping timers to tick more infrequently.

- The Widgets themselves have tick disabled.

- The Widgets are encapsulated in invalidation boxes.

**Demonstration of what I want and have right now:**

https://youtu.be/D4fQsQFS9Lk

— 0