Listen Server falling out of sync....with itself...


So in this image on the left is the Listen Server (Player acting as server)
When a client steps on the trigger and the Listen Server is standing on the platform it goes in and out of the mesh very rapidly. I had to reduce FPS to 20 in order to take that tricky shot.
When the client steps on the platform and the server triggers it, the client stays perfectly in-place.
When I run this as a Dedicated Server with 2 clients they will both stay perfectly in-place.

I am not running any Client-Only logic, all logic even the binding of delegates in this case (It was causing them to fire twice and I thought maybe that might be the problem but it wasn’t) are doing a HasAuthority check.

The thing moving it is a component (TransporterComponent) written in C++ (My code may be sloppy, I’m a noob)
https://pastecode.io/s/qsa7dbfv

The Overlap event on the trigger actor is bound on the server currently since nothing is firing from the client.

On the Actor this component is setup on, the Actor itself has ReplicateMovement true and bIsReplicated to true and the Mesh Component itself is also replicated.

I thought I would include the Pressure plate that triggers the actor with the Transporter Component which you can find here: TriggerActor (jsxoieoc) - PasteCode.io

The Transporter Components TriggerActors is linked to the PressurePlates from the Editor.

I’m just at a loss, I don’t know why Only the Listen Server is falling out of sync. To me this makes no sense, how does the server fall out of sync with itself when it doesn’t need to wait for the server to send the data?

We’ll I’ve combed the forums and the internet for a solution to this and I’m finding other people complaining about the same issue dating back to 2015.

We’ll in my case I’ll tell you that the issue seems to derive from the fact that I am firing it from a timer. When I moved this logic over to the tick and simply disabled/enabled that as needed it stopped doing it. So if your firing logic from the server maybe don’t do it from a timer.

If anyone knows why a timer would cause this apparent desynchronization of the listen server from itself please enlighten me because I am really curious to know as to why this would be an issue.

Yeah it still did it in Stand-Alone. So, it’s not actually a replication problem at all…It’s simply a bad idea to do that for moving platforms because they are going to run on a separate thread and just like how using weapon sockets as targets for the Hand IK in an Anim Graph (Since Anim Graphs also have their own thread separate from the Game Tick) that discrepancy between the GameTick and the TimerTick is what causes the problem since the Character Movement is on a separate thread and not in-sync with the timer. This leads to a situation where the Character can lag behind because as far as it is concerned…the platform has not moved yet.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.