Smooth Sync: Sync your Transforms Smoothly across the network

On the ThirdPersonTemplate it works perfectly, maybe because of its Character Class or because it doesn’t move via addForce and addTorque.
I’ve just tried the normal Pawn Class again and it works as expected as long as I use world offset instead of addForce… both Unreals Movement Replication and with SmoothSync.

[USER=“70536”]Patrick Dunkl[/USER]
Are you saying Replicate Movement fails in the same way? If it does, it’s probably just some Unreal Engine thing that I can’t do much about. The first thing that comes to mind is maybe you are adding force on every computer instead of just the computer that’s supposed to be moving the object around.

Let me know if it’s just SmoothSync failing at AddForce and I’ll build a mobile version to test it out.

Ah sorry, “both Unreals Movement Replication and with SmoothSync” belongs after “I tried the normal Pawn Class again”, messed up the sentence…

I filter out if the Pawn is locally controlled, if it is, it ticks and has Physics Simulation on
If it is not locally controlled, than just do nothing and wait for replication.
Also only add force if it is locally controlled and completely ignore if it is not.
As I mentioned, it works completely fine if the Pawn is controlled by a PC.
I tried also to crack up the send rate, the net frequency and set net dormancy to never. I though maybe Unreal is limiting something on Mobile but nothing has changed.

What works on PC and Mobile:
*Unreals build in Movement Replication (but I have to activate Physic Simulation on the not controlled Pawns, what I want to avoid to save perfomance on physics calculations on mobile devices…
*Get actor location and rotation on tick send it as repNotify (skip Owner), and in the RepFunction set the location/rotation of the corresponding pawn on the other clients with lerping from current position.

Only works on PC:
*only simulate if pawn is locally controlled let SmoothSync handle all the movement replication with extrapolation.
the mobile pawn just stops replication after a few seconds while receiving all the PC clients as usual.

It works for me on android with the Rolling Template which uses AddTorque. Does the Rolling Template correctly describe your situation?

Otherwise, I think I’m confused as to where it is failing. Can you say the steps again to recreate the issue?


Okay, I’ve tried the Rolling example with physics simulated only for local controller and let the replication do the rest -> it works perfect on Android and PC.
The problem must be in relation with either:
*Constantly adding force (linetrace for hovering from 4-5 points)
*Using ChildActor inside the pawn

  • or something with my session handling is just plain wrong

I’ll check and recreate them with alternative methods to see if the problem is caused by these things.
But anyways, thank you for your time and checking it. :slight_smile:

Edit: I’ve migrated the RollingBall pawn to my project and swapped my pawn with it, the problem appears again, android stops replicating after few seconds.

Edit 2: The problem is solved! Your plugin had absolutely nothing to do with it, it just reacted to something what Unreal itself ignored. In the Gameinstance I had setup if a network error occurs, destroy the session. And for whatever reason there was always one network error if I connected an android device to a existing session or created one with it. By disabling the session destroying everything works fine now. And it’s just awsome seeing on the android device how smooth everything now moves/replicates in comparison to the other methos, thanks to your plugin. So happy :smiley:

Awesome, glad to hear it’s working. If you like my product, every 5 star rating helps us get noticed a bit more. :slight_smile:

Feel free to hit me up with any questions, problems, or comments any time. Cheers.

Alright. SmoothSync can now sync the Transforms of any components as well as actors. Thanks for the tip.

I have PMd you the changes in case you want it immediately before it shows up on the Marketplace.

**Version 1.10 **is up on the Marketplace.

-Added ability to sync components. Use SmoothSync.setSceneComponentToSync() to pass in the component you want to sync the Transform of. Available from blueprints or code.
-Fixed issue with coming out of rotational rest while not in positional rest, and vice versa.

This cures the jittering and desyncing issues caused from replicated movement in multiplayer?

I’m not really sure. I don’t know all of the intricacies of Replicate Movement. If you have specific questions about when it jitters and desyncs for you, I can probably answer better.

I think Unreal’s replicate movement doesn’t have a buffer of states though like SmoothSync does. This means that even if you have a network hiccup of .1s, if you set your InterpolationBackTime (a SmoothSync variable) to .1s, you will see zero jitter.
If you go passed this number that you set, SmoothSync will then extrapolate and attempt to do it as smoothly as possible.

Let me know if you have any other questions.

The issue I am having is in multiplayer listen-server, whether in simulated 2 person, or in an actual online session with 1 other person on an empty level, when we look at each other run, the animation is not smooth, it’s like the other character’s animation framerates are really slow, but on my own character its smooth as butter and the other player often gets moved by the server, which looks like warping. This is with the 3rd Person Mannequin with default replication settings and I have even tried tweaking the settings on the character and in the movement. I have read elsewhere that UE only has this issue in a listen-server, but not in a dedicated server. So Smooth Sync will smooth and sync player movement in a listen-server?

Yeah, movement will be super smooth in a blank ThirdPerson template listen-server.

You’ll need to sync the animations yourself though because SmoothSync only syncs things that have transforms. So you won’t see any arms and legs swinging around, you’ll just see the body moving around and jumping up and down. The animations should be easy enough to sync though by either lining it up with the time that gets sent with SmoothSync or you can probably just do walk or run animations based on speed of movement client side.

Let me know if you need any more information.

@fuestrine Do you mean that if I add the smooth sync component to my character that I have to do something extra to get the animations from the client character to show up on the server and other clients? Could you clarify? And will smooth sync work on the paragon characters from the marketplace? Thank you.

It’ll sync the transform of the meshes of the Paragon Characters but not the arms and legs independently without extra work.

Put simply, if you can see and move the transform in the “Details” panel, then Smooth Sync will be able to sync it. I believe these are referred to as “SceneComponents” and SmoothSync can sync any of them.

For the default ThirdPerson template, the arms and the legs are part of a mesh and look to be only accessible from not the Details panel.
So for the default ThirdPerson template, you’ll have to do something extra in order to get the animations from the client character to show up on the server and other clients (also for the server character animations to show up on clients). Smooth Sync will not sync the animations of Paragon Characters, they look to be the same as the ThirdPersonTemplate as to how they are set up.
Let me know if I seem to be completely misunderstanding something or if you have more questions.

Hi ! I have a crash with your plugin when I have 2 windows in editor (play with 2 clients) and I quit (or use windows key) while a movement on one of them.
My pawns use 2 smoothComponent (one for actor, second for cameraComp) but the second is disabled on the beginplay.

My crash report in attachment.

Thank you.

Hi. I’m not seeing this issue with a blank ThirdPersonExample template. I have two SmoothSyncs with one hooked up to the CameraComponent and then I disable the SmoothSync hooked up to the CameraComponent on BeginPlay. I can’t get it to crash on quit or windows key. Your crash log doesn’t seem to help me either unfortunately.

Does this happen in a blank ThirdPersonExample template for you?
If not, can you give me any other details that may help me to recreate the issue?

Hi, I’m sorry I can not redo it, I think it was a mistake for exiting/switch window, but I think it was the bug below.
The second smoothSync is not important (the bug works with only one).

The bug spawn when I set SyncAngularVelocity to None.

The crash from a new blank project :

As you see my pawn dont use an UE generic component for movement, its maybe the cause ? (because the bug dont appear on the ThirdPersonExample)

Another crash (can be reproduce in ThirdPersonExample), easy to fix in game and directly on the plugin :
UE crash if you use SmoothSync.teleport if your smoothSync is enabled false.

@fuestrine I’m thinking about buying this plugin, but I have a few questions:

1:How many players can it support at once?
2: Does it support replay?
3: If latency of 200ms and 20% packet loss is introduced, what would happen? (Video/gif would be great!)

Sorry about the issues and thanks a ton for bringing them to my attention. Thanks also for that great video, it allowed me to recreate the issue perfectly.

It’ll probably show up on the Marketplace in a day or two but I also sent you the fix in a PM in case you want it sooner. It’ll fix both your issues.