Smooth Sync: Sync your Transforms Smoothly across the network

@Null_Exception
I’ll have to make a project and test out your scenario. Thank you for letting us know about this issue.
About how many actors are you trying to sync?
The main dev these days for Smooth Sync is out this week, so you may have to wait about a week for a detailed response/solution though.

@
Thank you, it’s about 300 actors, using standard movement replication I see about 35-40ms/frame, adding Smooth Sync component and disabling movement replication I see about 250-300ms/frame when run listen server and client on the same machine.

@
I found the source of the problem. I have pretty heavy calculations on hit event of an actor and Smooth Sync cause the hit event to trigger on each and every actor even if the actor is still. Do you know how can I tweak the Smooth Sync system to avoid it?

@
I’ve managed to fix it from the hit event side but now I’m experiencing different problem - when I set owner at runtime and then clear buffer multicast, the transform of an actor doesn’t replicate from owning client to server but when server interact with it later it resets to the server’s state.

UPDATE:
@
Okay, I think I found the source of the issue. You’re checking the owner of the actor throughout the code like this realObjectToSync->GetOwner() != UGameplayStatics::GetPlayerController(GetWorld(), 0) but this way you don’t get the root player controller but rather player character first if it’s a prop for example. So when I used GetOwningController() function to get the controller GetOwningController() != UGameplayStatics::GetPlayerController(GetWorld(), 0) I’ve made replication work properly from client to server in case client is the owner! Can you please elaborate on this issue? Thank you!


@Null_Exception
Thank you for the detailed write up! Sorry about the issues. The main Smooth Sync dev is out for the rest of the week though. He will be able to respond to your questions early next week and possibly offer a fix soon too depending on how easy the changes will be.

Okay, thank you!

Just purchased, looks great. Is it possible to request a feature?
I would like to have option(flag) to override following functionality:

To ignore ownership and always sync from server to client.

It would be really useful to projects which use only server based physics (where mixing server based physics and client based physics is not possible).

Here is another problem;

If i disable smoothsync and enable it on a later time, it replicates an pre-enable state and does not replicate the most recent state at all. i have also tried the “force state” function but that has no effect. :frowning:

I have now returned to the default unreal engine replicate movement that works as i would expect in this case, but that causes jumps in the rotation - i wanted to use smoothsync to disable the rotation replication.

I Think i have found a bug.

If i only sync the position and set extrapolation mode to none, the position is not synced at all.
if i set the extrapolation mode to limited and the time limit to zero, it works. i would expect it to work the same as with “none”.
I also tried to “force sync on next frame” stuff, but that changed nothing.

i have created a video that demostrates the problem:

@RAwsome23 Yep, definitely something weird going on here. I just tested “only sync the position and set extrapolation mode to none” and it’s definitely not working correctly. I’m looking into that issue now. For your disable / enable issue you probably want to use the enableSmoothSync() method on the SmoothSync component to make sure everything is properly cleaned up and re-initialized across all clients.

Hello! Just a quick question about a jitter issue I’m having. Currently my ship is set up to use Smooth Sync to update the actor transform. However I’ve noticed when the ship is turning, there seems to be a jitter / jump happening, almost as though it’s snapping to certain degrees along it’s rotation, but that doesn’t appear to be the case (having looked at the rotational output on the actor)

It’s also possible that it’s only a perception from the player character, but I guess that’s still something I would need to solve somehow, and I figured this is the best place to ask.

Thank you!

The bug where syncing stops working with extrapolation disabled will be fixed in the next release. Thanks for pointing it out.

Definitely would be a nice option to have. I’ll take it into consideration. Thanks.

1 Like

I’m still testing things but looks to me like you’re right and all of those realObjectToSync->GetOwner() calls should be GetOwningController(). I think they just got missed when we switched over to the GetOwningController method. Good catch. Will be fixed in the next update.

I suspect that it is an issue with the player perspective. Are the boat and player both synced using Smooth Sync? Do they have the same send rate? It looks to me like the player is actually shifting around a bit on the floor of the boat, so it’s definitely some difference in movement between the player and the boat.

Cool, thank you!

This might be it! Currently just the boat is using SmoothSync, however when trying to add the same settings to the character, the character movement breaks pretty badly. Is there a setup guide for player characters / pawn actors?

Without Smooth Sync on the player characters, the players seem to move around correctly, and are carried by the moving (SmoothSync’d) boat, but the jittering mentioned in my last post remains.

Thanks again!

@ I’ve got another question/request :slight_smile: I’ve been trying to synchronize child actor components and couldn’t due to the plugin was checking attachment to the parent and skipping application of the component update if it’s attached. After I commented it out I’ve got perfectly working synchronization of the child actors. So the question is: why do you check it?


To reproduce the described behavior you need to create an actor blueprint and spawn some child actor from another blueprint which is replicated by the plugin. For example I have a constructor, a wall blueprint (not replicated) which can spawn a door blueprint as a child actor component which in its turn is replicated with the SmoothSync component. I checked “Component Replicates” through all the actor’s tree from the scene to the door but for the door, the actual component that is replicated, “Component Replicates” must be unchecked. Below are screenshots of the door.
image
image

Have you disabled the built in “Replicate Movement” on the character so it’s not fighting with Smooth Sync? Usually character stuff with Smooth Sync is pretty straight-forward, you just throw the Smooth Sync component onto it and disable “Replicate Movement” and it works. You can test it out in an isolated environment by loading up a fresh project using the Third Person Template. You should only need to do those two steps and to get it syncing using Smooth Sync.

I think my reasoning was that there’s no reason to actually sync an attached object since the parent object being synced should be enough to make sure the position is the same everywhere. If it works for you with that commented out though then I say go for it. I’d have to search through past issues to really know what inspired that change, but I know it fixed an attachment issue for someone. I’ll add a task to my list to look in to it more and see if I can rework it somehow to fix your issue without breaking stuff for others. Not super high priority though since it seems like you’ve got it working anyway :slight_smile: