So the problem is pretty simple. I have a player that runs around and can go up to a ball, click on it and hold it. The way the player is holding the ball is not by attaching it to the player’s bones or anything, I just want to make it lerp to the players specified “ball handle location” which is defined by an arrow component that is attached to the player’s root component. The first approach was to try and let the server handle the ball and move the ball to the appropriate client that is holding it. This all worked fine and gets replicated correctly but resulted in a very noticable jitter for the holding client. This happens because the client is waiting for the server to tell him where the ball is and then updates it accordingly, this approach becomes a mess when adding latency. So I bought a plugin called smooth sync which handles all the server latency for me, meaning it’ll smooth out the ball movement by interpolating and extrapolating between the ball positions that the player receives from the server. This all works like a charm but now I encountered the worst problem of them all.
Let’s say that the client has a horrible latency (200 ms) and is holding the ball. If the client moves, everything will look fine on his screen, but the truth is, on the server he only starts moving after 200 ms which means that the ball will also only start moving after 200 ms. This is no problem for the other clients since they are seeing what the server sees. But for that client with 200 ms latency, it looks like the ball is waiting 2 seconds before moving with him.
So my question is: “Is there a way to make the ball’s position get decided by the client that is actually holding him and let the server have latency instead of the client?”
Much like when the player jumps it is executed instantly, the client doesnt wait for the server’s response but shows everyone 200 ms later that he jumped.
Thanks in advance,