Pass Player Controller to server

I’m trying to repair a tank when I am inside an trigger.

First I register a client who is inside the overlap, take his player controller and send it off to the server to deal with it.
However, every time the server handles the repair, it is always referencing to its own PlayerController and thus repairing itself.
For this example I’ve just hidden the actor on repair.

Can anybody tell me how to successfully take the client’s PlayerController and deal with it? Or are player controllers always strictly client side and should I just pass the targetted tank to the server?

Thanks in advance!


This is a little confusing to me.

Where is this running from? the tank? the player controller? or a separate actor?

In the Trigger Repairing part, you don’t seem to be getting the tank’s controller but the controller of the player.
All you are doing is getting the controller of the player, then hiding the pawn that the controller is currently possessing (the player?) :stuck_out_tongue:

This is the repair station blueprint. Hiding it is just to figure out whether or not the correct player is being ‘repaired’. Logically I would think passing the tank’s PlayerController to the repair station would work. However, once I reference that same PlayerController in the actual repair function, the server’s Pawn is getting repaired, instead of the one initiating the action.

I have replaced any references from the PlayerController to the actual tank that initiates the repair, and all seems to work fine. So I guess you can only ever reference to the PlayerController locally.