Controlling an Actor using a widget from a Client.
So I'm trying to call Server functions on an actor from a widget on a Client machine. The problem I'm running into is that the actor doesn't have a valid owner to call the Server functions on since it's just being placed in the level and doesn't really "belong" to anyone.
I've read through all the documentation I can find on Networking but can't seem to find the right answer. So I know all the really obvious stuff (setting bReplicates to true, making the component replicate, setting the UFUNCTION to have "Server", etc).
I've tried using "SetOwner" to set the owner to the Server's pawn... however when I go to call the function it doesn't work because there isn't a valid "controller" on the client machine. Thus the red X on the diagram where the function call doesn't work.
I know I can reroute the input to go through the player controller but I'd rather not since I'll have several different ways to interact with the environment and it will quickly become cumbersome.
Is there a way to correctly set the owner on level actors so I can call server functions directly on the object without going through a player controller?
Blueprint Example: (This is pretty much exactly what I'm doing code side which also doesn't work)
The widget grabbing the only actor in the space and calling the server function on it.
Here's some basic implementation where it should be rotated. All of the replicated flags are set and this works on the server... not so much on the client.
asked Jun 17 '15 at 08:08 PM in C++ Programming
Ended up finding my own solution and posted an answer here: https://answers.unrealengine.com/questions/242055/cannot-call-server-rpc-from-clients.html
answered Dec 06 '15 at 04:23 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here