I’m working on an RTS game kind of like Warcraft 3, where each player has a hero unit along with their regular units. While testing the UI, we discovered an issue in that, when the camera moves far enough away from the hero, the clientside version of that hero is destroyed. Upon returning the camera to the hero’s location, a new one is spawned with a different name.
Our debugging took the level blueprint, ran an event tick that got all actors of the hero’s class, and printed their display names. Client 1 currently owns AI_KIMHero1.
After moving the camera away, the hero’s model disappears and Client 1 no longer prints a display name. Presumably, UE4 is temporarily culling the pawn to improve performance.
Moving the camera back towards the pawn’s position prior to it destroying itself, a new pawn called AI_KIMHero2 is now owned by Client 1.
Does anyone know what is causing this, and if it can be disabled, or a workaround? We know that the dedicated server’s copy is not destroyed, but we’re stuck on how we could use that to fix our issue.