In my multiplayer game, players have the ability to pickup objects using a physics handle.
I want the player that picks up each object to take control of that object locally and send the object’s position to the server. This will prevent any latency.
I’ve only recently started to study actor roles. Here is my general understanding of how to solve my problem:
-Player presses ‘interact’ button which calls a line trace on the server
-Line trace collides with an actor that can be picked up
-Collided actor sets it’s owner to the player controller that collided with it
-Collided actor should also call
SetAutonomousProxy(true, false); in it’s constructor
-Player can now control actor’s position
-If player drops actor, server should SetOwner to null
However, I have been attempting to implement this, and autonomous proxy doesn’t seem to be working as expected.
Even after SetAutonomousProxy and SetOwner are both called on an actor, that actor still shows
GetLocalRole() == ROLE_None.