Haya,
I’m trying to figure out if there’s a way to have an actor that is capable of receiving messages from a client and then multicasting then to all other clients somehow (thinking like a chat system). Essentially what I want to do is to have a client be able to trigger an event on all players in a game, but the only way I can see to do that is by using the client owned playerstate/playercontroller to route messages to some server side actor that then multicasts everything back down. I’m not a huge fan of this because it seems like it will clutter up my playerstates/playercontrollers over time as similar functionality is needed.
Ideally what I want is to be able to have a nice encapsulated system where clients can call things on the system that can optionally call things on the server/other clients depending on what’s needed. Right now it feels like way too much gets routed through my playercontrollers/playerstates and it feels icky to me.
The only way I can see to keep things actually encapsulated atm is to spawn a server actor, then when it spawns on the client have it spawn a client owned actor that it has a reference to, but that still feels awkward to me.