Multiplayer widget ownership?

Good day,

I have an actor that can be interacted with and a widget component becomes visible once selected. This interface works for both the server and the client.

The issue is, the widget is not allowing for the ‘onclick’ event from the clients side to change the mesh of the actor that is selected. The server is able to. I have narrowed down my problem to an ‘ownership’ situation in the replication. i think?

Simple setup. I am using an interface from the player controller. that sets the visibility of the selected actors widget component. the widget has a cast to the parent actor which activates an event. The event changes a repnotify variable that calls for the building event. Actors are replicated and the client sees changes when the server activates the change mesh event.

The server side player works, the client does not.


Problem fixed,
It is an ownership problem. I have to use the widget via the player controller and not via the targeted actor. This widget then does an rpc to the server which targets the actor and changes.

I was trying to have the widget attached to the actor i wanted to change, but this doesnt seem to be compatible with the replication network. you have to have the player controller pass the information to the server (RPC) and the server then casts to the actor you desire to change.

Even if your selected actor had an RPC within it to ask the server, the client did not have permission to make the actor call an RPC to server.

1 Like