First of all, I posted this on Reddit…hopefully it’s not bad posting it again here. I’m new to Unreal and love it, but new to the community.
I also understand that many say this is an unsolvable problem but I would consider other methods to get through this and get on with gameplay programming. Here it goes…
I’ve been trying to figure out the best way to move a player pawn and have it replicate to other clients without appearing to lag on the owning client.
I’ve added 500ms of simulated network lag (PktLag=500) in the DefaultEngine.ini to better visualize the results.
At this point I’m keeping it as simple as possible by doing only forward and backward plane movement with the mouse.
As you can see in the attached blueprint, I run the simulation on the client and on the server with a multicast event. Inverting the order produces the same result.
There is also an event on tick to replicate the overall player transform to keep physics in sync after collisions.
The problem with this implementation is that while I can see that the plane tries to move immediately when I move the mouse, it immediately stops and kicks in again after half a second when it finally receives the information from the server. And movement is generally slightly jittery.
Enabling or disabling replicated movement on the pawn does not produce any noticeable difference.
The Vinterp does not seem to have any effect whether I have it or not, or whether I change the Interp speed. I’m probably doing something wrong there.
If I remove the tick movement event, client response is immediate but the plane quickly gets off sync with the server.
So that’s it. I’ve tried tons of combinations to finally come to this but it’s still not good enough for a game.
Should I focus on client interpolation?
Should I use a character component for the plane instead?
Is this whole implementation way off, and should I give up on physics altogether?
Any input would be greatly appreciated!