Zorder of WidgetComponent to bring it in front of UMG Widget

Hi,

I have not found a feature request for this in the issue tracker, so I’m filing one now.

I have tried to bring a 3D WidgetComponent in front of a normal UMG widget by means of z-order.

I have attached a clean project based on 4.15 and the top down blueprint project template, containing the following setup:

  • The WidgetComponent is attached to a character, and contains a button. ZOrder is 1
  • The WidgetComponent is attached to Content/TopDownBP/Blueprints/TopDownCharacter named ClickWidget
  • The HUD contains a frame widget with zorder -1 (Set in MyHUD Event BeginPlay)

When you start the game, the frame half overlaps the 3D widget, and the button can only be clicked on the non-overlapping part.

Expected: the button is in front of the widget due to higher zorder, and can be clicked.

Here is the sample project (OneDrive share)

Hello Wurmloch83,

Your issue lies in how the Widgets are being added and how unreal determines the order of 3D widgets and regular Widgets. 3D Widgets exist in the 3D space of the level, while a normal widget is overlayed on the screen, separate from the 3D level itself.

This means that a 3D Widget cannot have a higher Z-Order than a normal widget as the normal widget can’t be a part of the 3D space.

You can work around this issue by making both the same kind of widget (either make both a 3D Widget, or both a normal widget). When they are both the same type of widget they will respect the Z-Order as you need!

Good Luck Creating!