Hey mate, so the quickest way to reproduce the basic server owned actor desyncing is the following:
Open a new top down template project.
Create new actor blueprint (Named Ball in this example), add a new “Sphere Component”, select the new added “Sphere Component” (below DefaultSceneRoot) and set collision of the sphere to “Physics Actor” and set “Simulate Physics” to true, set mass to 100(optional),
Set the blueprint to replicate, but not replicate movement.
Add the SmoothSync Component.
Select the SmoothSync Component and under the "Important category, set the checkbox “Set Owner to Server” to true.
Place an instance of the Ball actor in the level.
Compile, save, play in editor with dedicated server unchecked and move the player character to the ball, observe de-sync immediately when the ball has its first collision.
Having substepping enabled or disabled has no effect.
This scenario occurs when the actor is already placed in the map.
The same occurs when spawned in.
Spawn method as follows:
From the TopDownCharacter blueprint, Add an input node (in this case I just used the number key “1”).
Add new custom event, set to “Run On Server” and set Reliable to true.
From the 1 key executable output connect to the custom event.
From the custom event, add a “Spawn Actor From Class” Node and set the Class field to “Ball”
Get the Character Mesh component by dragging from the component list into the Event Graph.
Add a “Get World Location” node, and connect the “Mesh” Node to this.
Add a “+Vector” node, add 500 to the Z axis field, leave the X and Y as 0.
Add a make transform node, connect the “+Vector” node output to the Vector input on the “Make Transform” node, leave the other fields default (0 rotation, 1 scale).
Connect the transform output of the “Make Transform” node to the “Spawn Transform” input of the “SpawnActor Ball” node. (this will spawn the ball above the player character).
Compile, save, and Play In Editor with dedicated server unchecked and players set to more than 1 (haven’t had a chance to test dedicated setup yet).
Use the player character to push the ball around and observe de-sync on client after the ball has its first collision.
Tested on Windows 10 on 4.19.2 Source built editor.
Same occurs on non-source editor.
On the places where it has worked for me (namely having a trailer attached to a possessed vehicle via a physics constraint, with the trailer owner set to server and the vehicle owner set to the player on possession using a set owner node and switching the “Set Owner to Server” node to false on possession) there is no problem until a first collision occurs (or I think this may be the case).
Issues seem to arise on first collision with another actor?
Will try to put a couple of short videos together to demonstrate.
I’d rather not send my project files (100GB )
Thanks in advance for your help with this.
Additional thought, when it does work (with trailer and vehicle) the physics is set to Kinematic on the wheels of both in their respective physics blueprints, maybe this has something to do with it? It does eventually de-sync though.