Download

Wehere would you store the HUD? Pawn or Controller?

Hi,
Just a question:
Where would you store the HUD? As part of a pawn or the PlayerController?
I ask specifically for Spectator mechanics. When one spectator views another player it should see its hud(should work in splitscreen, too). Pretty sure the same HUD can only be attached to one Playerscreen at a time. So best is a pawn has events a Playercontroller listens to, to replicate the HUD, each on his own?

Controller. Use the closest to relevent location. HUD is client side decoration/information. Should stay local such as controller. If you destroy a pawn you lose your references thus more work in the pawn to remove from parent etc when pawn is destroyed.

If a player is spectating another player hopefully you’d be getting a reference to said player to get said variables to show in spectators HUD.

If found it easier to when a player possess a pawn to use posses node to set thisplayerpsref. Casting from incoming controller to get playerstate. Then you can use other methods getting pawn to cast to its reference to get values.

Thanks for the input
currently i implemented it so the pawn triggers events. Controllers can attach themself to the events to update their HUDs