Setting input on HUD BP without a playerController

My game doesn’t use a PlayerController class (bad idea?) and I’m trying to set my HUD to get input. The only way I can get this to work is to actually use a PlayerController, set its input, then get that input into the HUD BP with a ‘Get Player Controller’.

I read a tutorial about this implying you can enable input on a HUD BP in a different way but didn’t explain how. I’ve tried overriding my GameMode and setting the HUD class to my HUD_BP in that GameMode but no luck with that either.

Cheers for any input!

You’ll still have a player controller behind the scenes, but it is just the basic needed to get the game running. You can use that as a jump off to get to whatever player you want to display data for.

  1. You can get the PlayerState from the default controller.
  2. You can get the player’s Pawn.
  3. You could always create a Controller that does nothing but keep track of the relevant data for the hud.
  4. If your data is not specific to a player, you might just get a reference to the game mode or game state.