Smooth Sync: Sync your Transforms Smoothly across the network

Smooth Sync position/rotation is managed by whoever is the owner. This can be either a server or a client.
If you want to validate positions and rotations on the server of client owned objects before applying them locally on the server or sending them out to other clients, you can edit the engine plugin and add your logic inside of the built in _Validate methods for the RPCs in SmoothSync.cpp

Hello!
I am using the Smooth Sync plugin on 4.27 (latest plugin version) to replicate vehicle position and the FGear Physics plugin (FGear Vehicle Physics in Code Plugins - UE Marketplace). Everything works fine except for displaying the replicated transport on the client. Things like this happen:

Try taking a look at the two vehicle templates that are provided by Unreal. Smooth Sync works with these and then try to see what might be different from this system and yours.

In your video, it looks like Smooth Sync is fighting with something else that is trying to set the position. When using Smooth Sync you will only want to move the objects on your owner or the server if there is no owner.

Hello, I was wondering if you could help me. I’m having problems getting this working with physics. I basically want to get it set up so that when 2 objects collide they react to each other. I’ve got this working but when I add Smooth Sync to them they just completely stop.

I tried to set the ownership to the listen-server like this

SetOwner(UGameplayStatics::GetPlayerController(GetWorld(), 0) );

Then I try and call the AddForce like this

		if(HasAuthority())
		{
			MeshComponent->AddForce(GetForwardDirection(2500 * SwingPower), NAME_None, true);	
		}else
		{
			Server_AddForce(GetForwardDirection());
		}

The Listen-Server moves however the other doesn’t, also there are no Physics when the Listen-Server client hits the other objects. However, if I do AddForce on the client and run it into the Listen-Server it collides with Physics… I’m a little confused and would love some help. Thanks!

So I’ve fixed my issue by separating the pawn and the object, so now the ball is its own object that is spawned on PostLogin, then the pawn is basically just spectating the object. When the player presses a key its sent to the server, then the server moves the object.

After doing my own research this seems the best way to do it and for the most part, seems to be working. Please do tell me if there is a better way of doing this though.

@Hersh97
Your way sounds like a good way to go about it.

For your initial issue, you probably weren’t setting the owner of the right SceneComponent that you were trying to AddForce to, or you were setting the owner to something unexpected.

It sounds like your new way has the owner and movement line up better. Smooth Sync sends the Transform from Owner to Non-Owner, or from Server to Client if there is no owner. Sorry about the late reply, I took some time off but missed this before I left. I’m back now. :slight_smile:

Hi

I’m struggling a bit getting this to work how I want it.
So its working fine for regular transform related replication, however the client pawn gets attached to another actor. When this is replicated to the server, the server seems to argue with the client on what the actor’s transform is. As the client pawn will jiggle back and forth on both the client and the server. Or gets sent to a different location. Does the plugin support Local / relative location / rotation after having attached pawn to actor?

Any way to get around this?
Thanks!

@AquaRex
Sorry about the late reply, I missed this.
It should work automatically since semi recently. Please remove Smooth Sync via the Epic Games Launcher and then get it again from the Marketplace.

If that doesn’t fix it, let me know and then we may have an issue that I’ll need to dig into. Thanks!

Hello, I noticed that the plugin blocks the rotation of the bones [Transform (Modify) Bone] (tried to rotate the head following the camera). It works on the local part, if you do motion replication, it also works, but it doesn’t work using the smooth synchronization component. Is it possible to fix this, or is there another way to turn the head behind the camera, thanks in advance for the answer.

Blueprint and animation logic

@MrKuBu
Does it look like Smooth Sync is blocking the rotation on the owner? (or server if there is no owner)
Or is it just not being synced over the network?

In either case, maybe take a look at:
SmoothSync.setSceneComponentToSync() - Used to set the Transform that you want to sync. If none is set up, it will sync the Actor. Must have one SmoothSync for each Transform that you want to sync.

If that doesn’t help your issue, let me know and I’ll have to dig deeper. Thanks!

Hello hello

I would like if you could take a look at this and advise me if there are better ways to smoothsync physics constraints than what I’ve done SmoothSync component issue - YouTube thanks in advance <3

@
Hello, here is a video showing the problem. In case 3, if you do not specify the player’s mesh, it will be the same as in case 2.
Demonstartion and checking ways

I am developing football game, there was rubberbanding issue when playing in mutliplayer with 2 clients like when I am trying to kick ball or dribble with ball. I have tried so many things got over internet but they didn’t work for me. I have also raised question for that

but didn’t get any response. So I came to know about this plugin and I have enabled and did as suggested in a Rolling ball template video but still didn’t worked and emerges new issue like player goes through the ball and then it moves the football. The ball is perfectly fine in Single player like a normal football. If anyone knows how to resolve this issue Please do comment. Its been 2 months and I am still stuck.
Thanks

Hello! I’m having trouble using this plugin when converting a blueprint project to a C++ project. If I add a C++ file to the project, it fails to build due to a linker error, “cannot open […]\UE4Editor-SmoothSyncPlugin.dll”. The path is correct and all folders and files along the path are set to writeable.


Here’s the video

@
Hi!
Please help to solve the problem of jittering the ship controlled by another player (multiplayer). I bought and use Smooth Sync plugin for movement replication.

The flight speed is 10000-20000 on average, for movement I use the built-in functionality through the MovementComponent.

Many times I twisted the replication settings in various variations. Also, i tried to turn on origin rebasing options. I test it by launching 2 clients in the editor.
The problem is super-important, I will be grateful for any tips that can help get on the path to solving it!

I swear I already responded to you somewhere but I can’t seem to find any record of it so I’ll just respond here. I think for your case here you really just want one Smooth Sync instance to sync the root component of your helicopter. There’s probably not much to be gained by syncing the blades and wheels and other parts individually, although you could do that if you really wanted that level of precision.

In general though you don’t want to sync any more than you absolutely need to, so probably best to just keep it simple here, sync the root component, and everything else like the rotating of the blades can just be animated client-side.

If you do want to sync every little piece you also may get better results by disabling any physics constraints on the clients so that they aren’t fighting with Smooth Sync.

1 Like

Getting players to interact physically with an object like that is always tricky. What you probably need is some form of client-side prediction, which Smooth Sync unfortunately does not have built in. You can write your own client-side prediction on top of Smooth Sync, but I don’t expect it will be particularly easy.

If you do some research on client-side prediction the concept itself is not particularly difficult to understand, but implementing it will take some effort.

Have you made sure to turn Replicate Movement off on the component that you are syncing via Smooth Sync?

You could also try increasing the Time Smoothing settings on the Smooth Sync component.

Unless you can replicate the issue in a fresh C++ project I don’t think it’s really a Smooth Sync problem and more of an Unreal problem. It seems like I always have some sort of mysterious issues when trying to convert from Blueprint to C++. In my experience it’s best to just always start as C++ and avoid the headache.

Some combination of regenerating the visual studio project or doing a clean build of the project may help.