Can you set a UMG widget to split screen player?

ATM, from what I can tell, you need to do it yourself.

When you create a HUD attached to a player, my assumption would be that the HUD elements would be bound to that player’s viewport, but it seems that this isn’t the case.

However, there’s a way to work around it (hoping that in the future it is handled better by UE). There’s a function that you can call on the widget to set Anchors.

The problem here is that you need to know exactly in which place each player is, which will require some code from our side.

ATM I have the following:

As you can see, this will setup a 2 player split screen. The delay is because I have some code that “orders” the players, i.e. gives them an index 0, 1, etc.

Then I basically calculate top half for player index 0, and bottom half for player index 1. Main variable is the widget.

If you need to support 3 players it will get a bit messier, but as long as you know which player you’re getting and the position it will end up on screen, it should be fine.

Nuno Afonso