@Devolution.exe
This is expected behavior I believe for what I am seeing. Physics between objects owned by separate systems isn’t going to work well.
You’ll want your ball (and probably your bench too if it’s so interactable) owned by the same system, typically this is the server. (or have no owner and Smooth Sync will sync from server to clients)
For the triggered events though, you can maybe switch the SmoothSync.cpp setPosition() method to use true instead of false like:
realObjectToSync->SetActorRelativeLocation((FVector)position, true, 0, type);
It looks like true would give you your events more often, but may also mess with the visuals. But Smooth Sync also should snap to the position if it stays too far behind because of the extra stoppage that may cause. I may have to revisit this section to add more settings that are easily accessible for our users. Thank you for bringing this to my attention.
Let me know if any other questions.
Hello, I recently bought this plugin. I am trying to disable and enable it at runtime. When I turn it off there is no problem. But when I activate it and the character is moving, it starts going super fast. If I activate it while standing still and then move, this problem doesn’t happen. I leave a video and the code that activates and deactivates the component in runtime when pressing a button.
Video (Server: true = Smooth Sync disabled and normal replication movement active / false = Smooth Sync enabled and normal replication movement disabled)
You should use the provided enableSmoothSync method when turning Smooth Sync off and on. It does so in a networked way, as well as handling clearing the state buffer and some other clean up.
If you do want to enable and disable SmoothSync only locally, without using enableSmoothSync, then you should at least make sure to call clearBuffer after enabling.
Let me know if you still have issues after trying that.
Hey curious if anyone’s had thoughts on using smoothsync with movement bases. I have a case of a player driving a vehicle, and a second player on top of the vehicle, and while the movement of players works great, the simulated proxy of the second player (on the first player’s client) floats behind the vehicle.
For context, using unreal’s replicate movement via character movement component DOES handle this case okay.
Characters don’t have any velocity when on a movement base (I believe they are just moved directly along with the base in their update), so I could see smoothsync not picking that up, but I’m surprised that the simulated proxy itself doesn’t do that behavior (even though it also knows the movement base). But maybe that behavior is disabled when replicate movement is disabled.
Anyways, was curious if anyone had run into similar issues. BTW, excellent plugin - very straightforward and powerful, it makes complicated movement stuff SO much easier
SimulatedTick just isn’t called on OnControlled characters when ReplicateMovement is set to false
Since “Base Movement” isn’t reflected in the velocity, smooth sync doesn’t know about it for extrapolation (if needed)
My vehicle is moving fast enough that even the most recent sent state is far enough away to hang off the end of the vehicle
I’ve hacked in some charactermovement->basedmovement based extrapolation, I think I might try forcing the component to extrapolate in high velocity cases and see what happens (since I think it’s going to have to look ahead or be incorrect). But it might be useful to have a way to tweak interpolation/extrapolation based on move speed rather than solely time, but maybe what I’m doing is more of a special case!
Okay I figured out a solution to this, so I figured I’d shout it into the void in case anyone in the future finds this useful!
Essentially the problem is the following:
Client 1 is driving a vehicle that Client 2 is standing on
Both clients and the vehicle are replicated using smoothsync
The vehicle is synced to client 2, but is behind where it is on client 1’s machine (because of network travel time and smoothsync’s 0.1s buffer time).
Client 2 syncs its position to Client 1 (which looks totally fine to client 2)
However, since the ships are in different places on both machines, client 2 appears to be floating in the air behind the ship.
The vehicle is moving quite fast, which makes this much more noticeable.
My solution was the follows:
-Add another byte for smoothsync (on the characters only) to (optionally) sync - “current vehicle” (which I can lookup via a subsystem)
-if this byte is set, it will also sync its offset to the vehicle
-any remote clients looking at this player will know which vehicle and what offset (so they can get the correct position of the vehicle on their machine to then offset the player by)
-Rather than syncing “current ridden vehicle” via character movement’s movement base, I made a big overlap box on top of the vehicle, so you could jump without “leaving” the vehicle.
-As a bonus, I also disabled foot placement when on a vehicle cause it was causing my characters meshes to do weird things!
Here’s a diagram of the problem, and I hope this was helpful to someone!
Hello Everyone. I do have a problem, but I just want to know if I use this plugin, will I be able to sort out my issue, I am using a physics based spaceship that can be controlled, now the issue is it gets very buggy/laggy at higher speeds only on the client though. Would I be able to use this to fix that issue?
Hey - highly recommend reading my post just above yours, it deals with this exact issue. I did manage to mostly fix it, but it did require some code changes to smoothsync.
Hey everyone. I want to fix an issue I am having, and if this problem can be overcome it would be a huge step. My player has a smoothsync component and so does a moving object. When my player touches the moving object, I multicast “attach actor to actor”, setting the object as my character parent. This allows the player to automatically inherit all of the objects transform. This looks fine on the player who is controlling their player, but to everyone else, the player snaps back to the origin, and also does not inherit the transform of the object. It appears to be an issue with the sync component. I have tried calling the set scene component to sync on the player capsule after attaching, but it doesn’t make a difference. Any help would be greatly appreciated.
If you aren’t like walking around the spaceship then I would think Smooth Sync should work out of the box for you. If there are multiple actors on the spaceship owned by separate clients, then it could get weird. I’m always happy to offer a refund at any time for any reason at all if you want to try it out. Cheers.
@freck24
Sorry but I am not familiar with firebase. If firebase is updating your positions though, then I would think Smooth Sync would not be needed. But if you want smoother syncing, then Smooth Sync may be for you. I’m always happy to offer a refund at any reason for any time though so feel free to see how it goes if it seems like it would work for you.
Unfortunatly this plugin seams to be broken in UE 5.3. Everything worked perfectly fine in 5.2 but since updating to 5.3 and the new plugin versions it no longer does sync anything.
While playing in Editor with 2 clients it’s synced. But on a standalone build either Dedicated Server or P2P it’s always and instantly out of sync and does never sync at all.
Which is a massive bummer. The setup is unchanged from 5.2 to 5.3. Only the Engine and the Plugin was updated.
So this just syncs movement right? I would still have to use the replication functions for things like crouching? Because I started a new project with this component and when crouching the player sees the server owner crouching. But the server owner cant see the client crouching they just sink into the floor.
I managed to get the character to crouch however using the crouch function the capsule doesnt crouch, So I am assuming I would have to make my own crouch function instead of using epics function.
@DieVersiti
Correct, this will just sync your Transforms. You will have to sync your animations yourself. (We technically sync MovementMode and velocity which help with some animations but it’s kind of more thrown in so we don’t advertise it or really even support it).
I just bought this plugin, and am having some difficulty with the following:
I have an actor that is replicated and is owned by a client, and am adding an impulse to this actor from the server only. When I use the “Replicate Movement” option in UE and am playing as a client, the actor responds to the impulse fine on the client and the server. However, if I use your plugin instead, the actor doesn’t move at all (on both the client and from the server’s perspective). It’s like the impulse is not applied at all (when playing as a client). But if I add the impulse if I am playing as a Listen Server, the actor moves fine.
Why is this happening? Is there some property that I have to set to make the impulse work? Again, I am applying the impulse from the server only.