Pawns/actors only for owning player

How am I to handle creating pawns that only exist for their owning clients?

I’m making (trying to make) a space sim, where there is no distance limitations. In single player, it’s doable, thanks to world origin rebasing.

But for multiplayer, I have to manage what happens if players get too far away from each other. So I chose to have a separate world for everyone. Actor locations are managed according to my stored data (of where the player is in space), if an actor is too far, they are removed.

My problem is that when I create a pawn for a client I cannot possess it, as only the server can issue such order, but the server is not aware of the existence of that pawn if the client is too far. If I create a pawn so that it is created on the server so that I can issue said order, I can’t seem to manage to remove it from everyone except it’s owner/possessing client.

And apparently it seems I have solved it. Not perfectly sure but I made good progress.

  • Map/Game starts

  • 1 pawn is created for every player, on all clients

  • Said pawn is invisible and has no collision, nor does it have any reaction to player input.

  • On every client, an actor is created that will act as a pawn - for all players and their game worlds, only their own is created, they can’t see the other players’.

  • On every client I “lock” all player pawns to said actor. In player1’s world, everyone is locked to his, in player2’s world, all pawns are locked his own chosen actor (which is not the same as player1’s and they are not present in each other’s worlds). This is necessary as the game has infinite worlds and eventually the distance to the starting pawn would grow too high (I think the editor has 11km max as coordinates).

  • I set view with blend to selected actor’s camera for it’s player.

  • I communicate all input of one’s pawn to that player’s selected actor.

Basically I possessed them. Without them all being on the server or any other client. I can freely interact and control them etc.
Not sure if this approach will work but certainly sounds better than using multiple dedicated servers in a Photon system. It might be easy for some but I intend to use only blueprints if possible. Time will tell.