Ok, I’ve tried experimenting some more and I think I know exactly what’s wrong, I just don’t know how to fix it.
It seems that the reason this is not working is because only the owning client can change the velocity of the actor and move the controllers pitch and yaw position. The “Set Velocity” can be called on the server and another client, but since the server and that other client is not the owning client, nothing happens. It seems as though this has been hard coded into the pawn to prevent cheating or something, but with an authoritative server that does it’s own logic that should not be a problem. My blueprint only sends inputs to the server, and the server should perform it’s own logic and send transformation coordinates back. So I just have to find a way to allow the server to set the velocity of other clients.
I made a system to replicate an actor’s transformation and found that you can set the transformation of an actor on the server and other clients even though you’re not the owning client. Since only the client could move, I replicated the client’s transformation coordinates, sent it to the server and had the server set the actor transform on all the other clients.
This works perfectly with the exception of some stuttering, but that can be fixed with interpolation of the transform positions. I also know that the other glaring problem with this is that the client can easily exploit this and just tell the server custom coordinates to let them fly, this is just to demonstrate that setting the transformation on clients other than the owning client works.
Here’s a Youtube video showing it off:
But my ideal solution would be to do this instead:
If the server can perform all the logic on it’s own and just send transform coordinates back, this should work. I’m also going to write logic that compares the client’s own transformation with server’s transformation and taking into account lag with a circle buffer that logs the last 60 transformation coordinates along with timestamps.
But as I said the problem is that the server cannot set the velocity of the actor or move the controllers pitch and yaw if it’s not the owner of that actor and therefore not perform all the logic on it’s own. So the blueprint above just replicates that the actors are standing still mid air.