Different Location of Actor at Server and Client...???

Hey Guys,

so Iam still working on my GTA2-remake and spent the last time to redo my vehicle setup, as the origial one just became extremely chaotic. All of the functions (and a few new) are now remade and everything seems to work.
Only thing… My cars appear at different locations on the server and on the client…??
Even when I have a car just placed in the world and hit “play”… See some Screenshots attached.

  1. The position of the car as I placed it in the map:


2) When I hit play -> Left: Server, Right: Client (World Locations are displayed as PrintString) Note that the client side car is not at the correct position. Plus: Physics Simulation is jittering around very strangely…


3) Overview of the Blueprint. It is essentially a CarMesh with SphereCollisions as Wheels (plus constraints)


–> Replication is activated for the BP itself, plus the Root and CarMesh. I also tried activating replication of the wheels and so on, but it does not change anything…
–> I “outsourced” some of the necessary code into blueprint components, which is the main difference to my original vehicle blueprint (which worked fine)… Is it possible that this makes any difference? Activating Replication on these components does not change anything, though…

I would be very glad for any help!
Best wishes,

…anybody with an idea?..

OK guys,. it is really getting really weird. I made a video about what is happening, I guess it is easier to understand that way.
Apparently the problem is somewhere in the world-setup (i.e. begin play) that messes up everything… Does the following i any way makes sense to anyone of you?

If you need further explanations, just let me know!

(note: there is a “lag”, when I first play with dedicated server… That usually happens, when I have the editor running for the first time…)

Please make sure that you car has “ReplicateMovement” set to true.
In addition, you’ll want to have the root component to be a Mesh or Collision Primitive with Physics enabled (if you use physics).
That one should then also be marked as Replicated.

For your new Components, which you used to clean up the car, you only need to mark them “Replicated” if you actively replicate variables in them or use RPCs.

The way this looks is, that locations and Physics states simply aren’t properly synced between Server and Client.
You’ll get the same result if you play with two players where one is a ListenServer.

Please make sure that all Location changes are replicated properly.

Hooooly sh…! I believe that this was the main issue - Iam quite sure that it works correctly now O.O
I have to run a few more tests, but it looks fine at the momen :slight_smile: Iam extremely relieved, as this problem bugged me literally for months now!!! Thaaaaanks a lot!

Wow, this fixed my problem too… why does this limitation exist? I have other things in my actor that I don’t want to be parented to a physics object (e.g. a camera), which is why I had a scene component as the root previously.