Smooth Sync: Sync your Transforms Smoothly across the network

I will answere my question, so it can maybe help someone.
You have to remove the plugin from the engine location to your project.
If you have no Plugins folder in your project folder create one and copy the SmoothSync
plugin in this created plugin folder.

I have another question i am making a little tank game so i use smooth sync to replicate
the movement smoothly, the second phase of the project will be to make the turret turning
with the mouse cursor. When i finish with all calculation i will have some extra transform let’s
say “FVector turretPosition” is it possible to add this FVector to the smoothSync packet who is already replicating the position and rotation from the main base tank object ?

Thanks.

How to fix this issue?
ERROR: Missing precompiled manifest for ‘SmoothSyncPlugin’. This module was most likely not flagged for being included in a precompiled build - set ‘PrecompileForTargets = PrecompileTargetsType.Any;’ in SmoothSyncPlugin.build.cs to override.
PackagingResults: Error: Missing precompiled manifest for ‘SmoothSyncPlugin’. This module was most likely not flagged for being included in a precompiled build - set ‘PrecompileForTargets = PrecompileTargetsType.Any;’ in SmoothSyncPlugin.build.cs to override.
UATHelper: Packaging (Linux): Took 11,168165s to run UnrealBuildTool.exe, ExitCode=6

Unfortunately no there is no built in way to sync extra information like that.

The best you can do at the moment is manually edit the code to add your extra stuff to the SerializeState and ServerSendsTransformToEveryone_Implementation methods.

You also need to edit State.h to add your FVector turretPosition, then edit State.cpp and add the appropriate lines to Lerp, defaultTheVariables, copyFromSmoothSync, and copyFromState to handle the new turretPosition property.

In copyFromSmoothSync you could get the turretPosition from some other script that has already calculated it or call some method to calculate it on the fly right there.

All of that will get your values sent over on the states and get interpolation working. The last bit is to edit applyInterpolationOrExtrapolation() and add a line somewhere after the targetTempState is calculated (at the bottom of the method is probably fine) that takes the turretPosition from the targetTempState and applies it to your tank however you want that done.

From there you might consider doing something in the extrapolation method to extrapolate the turretPosition in some meaningful way.

Sorry it’s not easier! If you are brave enough to still try and you have any questions I’ll try and help you out.

I’m not sure. That’s an error I haven’t seen before. I tried recreating it but I couldn’t get it to happen.

What version of Unreal are you using?
Do you do anything in particular to get this to happen?
Update your SmoothSync to the latest version if you can too.

4.26.2

Thank you for letting us know about this Linux issue. I have a fix for it that will come with the next update.

In order to get it working right now, you’ll have to pull the plugin code directly into your project though as I was unable to force Unreal to compile from the Marketplace plugin folder.

Guide on putting an Engine plugin directly into your project:
If you want to move it into your project, try copying over the SmoothSync.h/cpp and State.h/cpp files. You may want to make these files first inside of your project then just copy over the content. Then change the SMOOTHSYNCPLUGIN_API near the top of the header files (.h) to whatever your project name is (just the SMOOTHSYNCPLUGIN part is your project name, then put the _API at the end of it). Make sure to keep the ALL CAPS for your project name even if it’s not in all caps when you made the project name.

Hello ,

Thanks for the plugin, I was hoping you could fix a small issue I came across.
I have a complex VR character with multiple smoothsync components, only the ‘main’ smooth sync component updates the Movement Mode of the character.
However, when I disable movement mode sync on the other smooth sync components, it only disables the sending of movement mode. When another client receives a smooth state, it will call ApplyNetworkMovementMode regardless of whether a movement mode was received.
Can you look into not applying the movement mode if no movement mode was received, please?

Cheers,
Jasper

@Jasdela
Definitely seems like an oversight on our end. Thank you for letting us know.
I’ll probably be able to get this in the next release that we put out.

Here’s how to move SmoothSync into your project and start editing code if you can’t wait until then though:

Copy over the SmoothSync.h/cpp and State.h/cpp files from your D:\Programs\UE_4.26\Engine\Plugins\Marketplace\SmoothSync\Source\SmoothSyncPlugin or similar folder.

You may want to make these files first inside of your project then just copy over the content.

Then change the SMOOTHSYNCPLUGIN_API near the top of the header files (.h) to whatever your project name is (just the SMOOTHSYNCPLUGIN part is your project name, then put the _API at the end of it).

Make sure to keep the ALL CAPS for your project name even if it’s not in all caps when you made the project name.

Hello @ and thank You for Smooth Sync plugin!

I need help with Max Depenetration Velocity for my replicated objects with Smooth Sync component.
The problem is that when objects collide they bounce away from each other too much.
I set Max Depenetration Velocity value to 25.0, but the objects continue to quickly fly apart from each other at a higher speed.
Please help)
Thank You!

Hi. I responded on the question page but I didn’t want it to seem like I didn’t respond to this, so I’m saying the same thing here. :slight_smile:

Are your moving objects that collide both owned by the same system? In order to get good physics, the colliding moveable objects should be owned by the same system. Typically this is the server.

If your objects are not owned by the same system, you won’t get too good of collisions but I don’t think I’ve ever had them fly apart from each other at a higher speed. But I’ve also personally never played with MaxDepenetrationVelocity too much.

Does the default MaxDepenetrationVelocity setting work for your scenario?

Hey there, loving the plugin so far! Any plans to get it up and running on the new UE5 preview 1?

Yes. There are plans to release an update for UE5 after UE5 officially releases. Right now it is impossible to release for 5.0 via the Marketplace because the latest that publishers are allowed to release for is 4.27.

1 Like

Any updates to this? :smiley:

If you are referring to Smooth Sync for Unreal 5, it is now on the Marketplace. Let me know if that’s not what you are referring to though.

I was, thank you very much!

Is there any way to sync an object for the player when they join a server and then not continue to sync that object?

I ask because I have objects moving up and down on a timeline loop forever, it would save resources/bandwidth and some sync issues if it was only synced once and then continues to play instead of syncing it forever. Thanks.

Hi, I’ve been trying to use the Smooth Sync plugin on my prototype of simulated gravity-free objects with Unreal Engine 5 since yesterday. On the client side, we can observe lags on the objects movements. But I tested the same protocol on UE4, still with the Smooth Sync plugin and there, no lags on the client side.

Should I configure additional parameters on UE5?
In both cases, for UE5 and UE4 I added the SmoothSync component in the cube blueprint and I unchecked the “Replicate Movement”.

Here is a short video of the lags I am talking about, on the client side: video link

Thank you very much !

I am having an issue with my multiplayer racing game using the plugin. As you can see in the video, the two cars collide at very different points in time when I simulate 30-60ms ping. Am I doing something wrong, or is this just a limitation of the plugin?

That’s exatly how net latency works. Your server receives client information with latency (ping). On client you hit the car earlier than it happens on the server.

I would think you could mess with the SendPositionThreshold or SendTimeThreshold (if that’s still a thing?). Then it would only send updates if the position or time changes by more than those thresholds.

Really though, it sounds like you don’t need SmoothSync for this specific scenario. It sounds like you could just RPC over something to start it.