How to support respawning with a MiniMap?

Hi guys, I’m new to UE 4 and working on a little third person C++ game to get into it. I tried to integrate a mini-map, following this tutorial: :[Eng] Complex Quest System: Adding a Mini Map #03 - YouTube

Sadly, respawning seems not to be covered in the tutorial. Everything else works perfectly good, however two issues come up as soon as I call GameMode.RestartPlayer(Controller) to respawn my player: The mini-map remains over the corpse and the player sprite shows up in the level :slight_smile:

I guess this happens because the mini-map’s camera and the sprite are both attached to the dead character. If I call GameMode.RestartPlayer(Controller), a new character is being created, having a separate mini-map camera and sprite, right?

My thoughts how to solve it:

  • In the character blueprint, there is not only the mini-map camera, but also the default follow camera of the third person tutorial. Since the follow camera works fine, there must already be some piece of code which manages camera changes which might be a good place to hook in, right?
  • If I attach the mini-map camera to the player controller, it might survive a respawn. But it feels hacky to have the default camera in the character and the mini-map camera in the controller, therefore I’m not convinced.
  • I can remove the sprite if I set it invisible or destroy it as soon as the player dies. Is there a better alternative?

Sadly, I haven’t found a tutorial covering mini-maps and respawns. It would be great if you could give me a direction how to remove the old sprite and how to update the mini-map. I’d also highly appreciate some kind of technical step by step overview for my orientation.

Finally, according to my understanding the mini-map works completely on the client side. It therefore should also work in a multiplayer, am I right?

Many thanks in advance :slight_smile:

The issue came up because the dead player’s corpse still remained in the map. After destroying the character, the mini-map worked fine.