I’m trying to get an actor’s role to be “Autonomous Proxy” on the owning client, and “Simulated Proxy” on the other clients, and even the server if it’s possible (although I assume it’s locked in as “Authority” regardless of ownership)
I have a function that’s called from a component that’s in my player BP
For now this function is purely trying to claim ownership over the “Equippable” input parameter. I’m trying to minimize latency by making as many things client authoritative as possible, which is why I’m attempting to set the owner on the client side first, then the server.
This part of the function prints “SIMULATED” on the client always.
This event always prints “AUTHORITY”, despite the actor being passed in (the player, which I test from the client) always returns “AUTONOMOUS”, as expected.
The “Server Set Equippable Owner” event also seems to make casting to, and then calling an event in the “Equippable” in “AddToEquipped” not work
I’m very confused on the matter and would appreciate any insight. Thanks in advance
Turns out you can’t change this for Actors that are not player controllers, and I think also pawns.
Thankfully, it turned out “is locally controlled” was actually what I wanted here, even though I didn’t think it would work previously.
–
The goal I was trying to achieve was client authoritative physics replication when an object is thrown by the player.
I set the equippable actor’s owner in the player’s equip manager component locally, then afterwards I do so through the server.
Then I trigger the event on the equippable actor, which sets a timer. This timer in turn gets the actors position, rotation, linear and angular velocity, then sends it to the server, which multicasts it.
Then on the multicast I check if the owner of the actor (being a player controller) is a local controller through an interface. If it isn’t a local controller, I update the meshes location, rotation, linear and angular velocity. If it is a local controller, I check the velocity, and if it’s low enough, clear the timer.
I have a function that sets an enum on begin play that defines this for me so I don’t have to go through large logic chains etc down the line. There’s also the benefit of being able to use this enum on switch. You can’t with local/network role.