Hello Community,
I’m testing this in the third person template. I have the server spawn a pawn with no owner. This pawn has a test RPC (run on server) that just prints “Hello”. When the client logs in he searches for the spawned pawn in the Authority side of his BeginPlay. When the controller finds the pawn he calls the SetOwner node to set himself as the Pawn’s owner. Note that he does this from the SERVER side of his BeginPlay event. He also stores a replicated reference to an internal MyOwnedPawn variable.
It’s my understanding that at this point the client controller is now the NetOwner of the server spawned pawn and thus should be able to make RPC calls on it. However that is not happening. When I call MyOwnedPawn’s TestRPC from a button press it does not execute at all. I have even checked that MyOwnedPawn’s owner and my Self reference are indeed the same object on both server side and client side - and they are.
I really need this to work. Bridging through the player controller or the controller’s possessed pawn is not an acceptable answer for me.
Can someone help educate me on this? I’ve scoured the answerhub and the forums. There are several mentions that this should be working but they are all using C++. Is there a known issue with the blueprint SetOwner that would prevent this? As I mentioned above I am calling SetOwner from the server side code - not from the client. That is the only caveat I’ve seen mentioned for making this work.
Many Thanks