Download

Smooth Sync: Sync your Transforms Smoothly across the network

@GrumpyNZ
What issue are you having with the plugin? If you give me a scenario where the plugin doesn’t work, I’d be more than happy to look into it. Screen shots of the actor you are trying to sync or the project itself is the best way for me to see what’s going on.

The last problem we had was you were not replicating the sphere, you were replicating something else. Smooth Sync can only replicate the movement of replicated objects, just like Unreal’s replicate movement can only replicate the movement of replicated objects.

More information on how Unreal replicates actors that could be causing confusion:
If your root component is a scene component and the static mesh component is a child of the scene component, the static mesh component will not replicate. Only the scene component will replicate. Make your static mesh component the root component and you are set. If you need a scene component, you still need to create a replicate enabled Actor with your static mesh component as the root and you also need to create another blueprint actor with a scene component as the root and the static mesh actor that you created as a child of the scene component.

That has no relevance to the context of your plugin and you’re confused.

Every client and the server each bring up a world. And for each actor spawned on the server, a copy is spawned on each client. The actor spawned on the server is referred to as a “server owned actor” meaning that when the client calls an RPC on that identical actor it is called on that actor on the server.

You’re setting the owner to server’s player controller 0 believing that it somehow makes the server own it and it simply does not. Player controller 0 is the player controller of the first player who joined the game. The first player who joined the game owns the actor using your plugin’s component. That is the player that gets synced. No one else does.

If you set ArbitraryActorX to own another actor on the server, that ACTOR owns the object, not the server. The actor needs an owning connection to call RPCs.

You can not make a solution for Replicates Movement that uses RPCs because objects that use replicates movement are not necessarily (and are rarely) owned. x10100

At the end of the day you are claiming your plugin does something that it does not, even after being told this.

  1. Doubt it
    2 & 3 Irrelevant

@Vaei
So you want it to sync from the server to clients when there is no owner? I can do that.

@GrumpyNZ
Just saw your edit, hopefully you haven’t been waiting long. I don’t get any notifications when comments from a month ago are edited so it’s best to just let me know here under a new comment.

I have fixed an issue with dedicated servers not being able to have the server control the transform. Thanks for bringing it to my attention. Let me know if you ran into a separate issue. I have already submitted a version to the Marketplace. I have also PMd you a copy if you don’t want to wait.

@GrumpyNZ
Alright, the new version is up on the Marketplace. Let me know if you have any other issues or questions.

New version has been submitted to the Marketplace.

1.06 Change Log:
Fixes for working with Pawn ownership.
Added function to enable or disable Smooth Sync. SmoothSyncEnable()
Exposed rest of public use functions to Blueprints.

Unreal approves things pretty fast so it’ll probably show up in a business day or two.

Hi, I’m having an error compiling my project when Smooth Sync is enabled. The error goes away as soon as I disable the plugin and restart the editor. I’ve attached the error text below (with my user directory redacted).

Is this a bug in Smooth Sync? How can I resolve this?

Using UE 4.19.

Thanks!


Project.Package: ********** PACKAGE COMMAND STARTED **********
ExceptionUtils.PrintExceptionInfo: ==============================================================================
ExceptionUtils.PrintExceptionInfo: ERROR: System.Exception: Couldn't update resource
ExceptionUtils.PrintExceptionInfo:           at ModuleResourceUpdate.SetData(Int32 ResourceId, ResourceType Type, Byte] Data)
ExceptionUtils.PrintExceptionInfo:           at ModuleResourceUpdate.SetIcons(Int32 ResourceId, GroupIconResource GroupIcon)
ExceptionUtils.PrintExceptionInfo:           at UnrealBuildTool.BaseWindowsDeploy.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, List`1 TargetConfigurations, List`1 ExecutablePaths, String EngineDirectory)
ExceptionUtils.PrintExceptionInfo:           at UnrealBuildTool.WindowsExports.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, List`1 InTargetConfigurations, List`1 InExecutablePaths, DirectoryReference EngineDirectory)
ExceptionUtils.PrintExceptionInfo:           at BaseWinPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
ExceptionUtils.PrintExceptionInfo:           at Project.Package(ProjectParams Params, Int32 WorkingCL)
ExceptionUtils.PrintExceptionInfo:           at BuildCookRun.DoBuildCookRun(ProjectParams Params)
ExceptionUtils.PrintExceptionInfo:           at BuildCookRun.ExecuteBuild()
ExceptionUtils.PrintExceptionInfo:           at AutomationTool.BuildCommand.Execute()
ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Automation.Process(String] Arguments)
ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Program.MainProc(Object Param)
ExceptionUtils.PrintExceptionInfo:           at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Program.Main()
ExceptionUtils.PrintExceptionInfo:        (see <REDACTED>Unreal Engine\AutomationTool\Logs\A+EpicLauncher+Epic+Games1+UE_4.19\UAT_Log.txt for full exception trace)
ExceptionUtils.PrintExceptionInfo: 
ExceptionUtils.PrintExceptionInfo: Exception: Couldn't update resource
ExceptionUtils.PrintExceptionInfo:    at ModuleResourceUpdate.SetData(Int32 ResourceId, ResourceType Type, Byte] Data)
ExceptionUtils.PrintExceptionInfo:    at ModuleResourceUpdate.SetIcons(Int32 ResourceId, GroupIconResource GroupIcon)
ExceptionUtils.PrintExceptionInfo:    at UnrealBuildTool.BaseWindowsDeploy.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, List`1 TargetConfigurations, List`1 ExecutablePaths, String EngineDirectory)
ExceptionUtils.PrintExceptionInfo:    at UnrealBuildTool.WindowsExports.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, List`1 InTargetConfigurations, List`1 InExecutablePaths, DirectoryReference EngineDirectory)
ExceptionUtils.PrintExceptionInfo:    at BaseWinPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
ExceptionUtils.PrintExceptionInfo:    at Project.Package(ProjectParams Params, Int32 WorkingCL)
ExceptionUtils.PrintExceptionInfo:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
ExceptionUtils.PrintExceptionInfo:    at BuildCookRun.ExecuteBuild()
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.BuildCommand.Execute()
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Automation.Process(String] Arguments)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Program.MainProc(Object Param)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Program.Main()
ExceptionUtils.PrintExceptionInfo: ==============================================================================
Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)

@gooberCP
I’m not seeing any issues in ThirdPerson and Rolling example projects, or in my own levels with 4.19.2.

My first tip is usually to delete the binaries, intermediate, and .vs folders in your project directory and then right click your uproject file and “Generate Visual Studio project files”. Load up your project and try again.
Google is saying to maybe delete your Saved folder too to solve this issue but I’m not too sure on deleting that one as I’ve never deleted Save myself. Either way, you should have a backup of your project to go back to if deleting your Save folder is bad.

If that doesn’t work:
Can you give me any other tips on how to recreate the issue?
What is your operating system? What exact version number of Unreal are you using?
Are you updated to the latest Smooth Sync version (1.06) on the Marketplace?

Let me know how it goes or if you have any questions.

Thanks! Deleting (renaming) those folders and having them regenerated worked, I can compile the project now with the plugin.

When the SmoothSync component is added to a character, I’m not seeing any walk/run animations play in third person. Is this normal?

@gooberCP
Yeah, you’ll have to play animations yourself. It seems impossible to tie into all animations. We just sync the transform of the Actor you put the Smooth Sync component on.

I’ve got videos up on the store page! Let me know what you think.

Video 1
Video 2

I have just bought it this plugin… this could be lifesaver if I can understand the parameters. Background: I am using this on a simulator which runs at ~30hz (need lots of optimization toward 60hz I know lol). And it will run only on lan. So what is the best parameter for the said circumstance ? As of now the parameters changed are:-

  1. Send rate: now it is 5 (was 30)
  2. Position snap threshold: 5000. I thought this is where the interpolation kicks (ie distance < 5000 unit = 5000cm = 50m)
  3. Rotation snap threshold: 2500.
  4. Do I really need to sync velocity & sync angular velocity? I am trying to not waste packet as the actor can be as many as 50 around the controlled pawn.

@Syed
It depends on what you want to do really.
With a send rate of 5, I wouldn’t expect perfect exact syncing if you change directions a lot but it may not be important for you.
Your SnapThresholds look good. They are rarely used except in cases of lag spikes which should be rarer if you are on LAN. Them being 0 would probably not hurt at all either.
You don’t need to sync velocity or angular velocity unless you are wanting to extrapolate. If you leave extrapolation on while not syncing the velocities, it will also try to calculate extrapolation based on received position and rotation, but it will be worse. If you are on LAN, I would think your network would be good enough to get the settings to where you never extrapolate.

Let me know if you have further questions.

Probably one of the other important variables is InterpolationBackTime. It tries to set the object that far in the past. With a SendRate of 5 and an InterpolationBackTime of .1, you are extrapolating half of the time. Which may be good or bad, I’m not sure what you are trying to do. Keep in mind if you have a SendRate of 5 and an InterpolationBackTime of .1 and turn off Velocity Syncing, it’ll probably look worse (when going into and out of extrapolating) than if you had Velocity Syncing on.

Let me know if I misunderstood or if you have any more questions.

Hi,

Its me again…yes the value should be more ‘sane’ eg the sending rate imo should be at least 15 - it was my clients who where experimenting lol.

Btw I think there is a bug - when you chose not to send velocity and angular velocity, the plugin crash. I thought it was my code, but when I revert everything and only disable those settings, it crashed.

@Syed
I don’t see any issues in a blank Unreal Rolling Ball template when I uncheck velocity and angular velocity.

What version of Unreal are you using? Any other tips on how to recreate the issue?

Hello,
I’ve purchased this great plugin and want to use it in my project. it works fine until i want to replicate movement on a second SkeletalMesh. Here is what I’m doing :
using unreal replication i set replicated movement and replicated to true for my actor and for the child actor which is a skeletal mesh i set ComponentReplicates to true aswell. everything works fine. now using SmoothSync i drag and drop it into my actor and uncheck only the replicated movement, and hit play my Main SkeletalMesh is replicated fine, but my second skeletalMesh won’t replicate movements, disabling ComponentReplicates on it i can’t see the mesh at all.
so i assume i can modify the source so my second SkeletalMesh can replicates movement too, or am i doing something wrong? could you help me out on this?
Thanks.
@fuestrine

@ATHIEK
How did I not get a notification on this?! I’m so sorry about the late reply.

Smooth Sync currently doesn’t sync components but it’s a great idea. I’ll start implementing the idea, but with Christmas basically here, it may be a week until I finish if I run into any issues. I’ll message you when I’m done.

Thank you very much, i sure be waiting for this feature as I’m going to use it in my production game.

Hi, I have a some difficulties using it on Android.
My pawn contains a collision box with physics and an child actor component(which consists off different generated static meshes for visual purposes only -> hovering vehicles with linetraces and custom gravity)
I completely deactivate the physics and even the tick, if it is not the local player, to minimize CPU cost for mobile, and each client calculates it’s own physics/movement. So the remaining thing is to replicate the location and rotation from the client to the server to update just their movement globally.

Everything works like a charm on PC and the plugin does a great job. But as soon as I want to join the session with my Galaxy S6 (nougat 7.0) the first 10 or 15 secs the replication of the Android player is also fine, in fact the same smooth syncing like the PC players.
But after that time the syncing gets worse and worse, taking 7 seconds up to 20 seconds to replicate the movement of the Android player…
Same happens even if my Galaxy is the listen server host, the player of the android device lags on the PC while the PC players are super smooth on both devices.
The game runs smoothely on 60fps, so I don’t think perfomance is the bottleneck.

Do you have any clue what might cause that problem?

[USER=“70536”]Patrick Dunkl[/USER]
I can’t think of anything besides maybe a memory issue. I’ll take a good look at the cpu and memory usage this weekend and get back to you with what I find.