Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Maxime066 Sorry Smooth Sync didn't work out for you. Glad you found a solution though.

    Leave a comment:


  • replied
    Damien Are you still having the issue with the basketball? How is the Actor attached to the Hand? If you can send me a project I can use to replicate the issue I can look in to it more.

    Leave a comment:


  • replied
    I have tried the plugin with an ACharacter, toggled off "Replicate movement" and added the smooth sync component. Works fine, but some events like crouching, which where replicated by the ACharacter replication code now do not replicate over the network.

    I can write my own RPC to do this in a custom ACharacter class or modify the SmoothSync component code. Which option seems better to you and where in the smooth sync code would you put the code to sync crouching, jumping ... etc if I choose the second option?

    Is there another possible solution to this?

    Leave a comment:


  • replied
    Oh thanks anyway. This plugin made me realise that I can write my own player replication code. So, I unchecked the replicate movement checkbox on my character and wrote my own code to move the character of other players on each client. It works perfectly.

    Leave a comment:


  • replied
    I tried both, and none work correctly. I made a project only to replicate this issue if you're interested to see.

    Here's my test case:


    With SmoothSync and replication movement unchecked, no network lag:
    - Server movement only: nothing move.
    - Client movement only: seems to work
    - Server and client movement: seems to work.

    Without SmoothSync and replication movement checked, no network lag:
    - Server movement only: lag appears on client character and on other characters.
    - Client movement only: no lag on client character but other player characters dont move.
    - Server and client movement: seems to work.

    With SmoothSync and replication movement unchecked, network lag* on second client :
    - Server movement only: nothing move.
    - Client movement only: client 1 see client 2 lag, client 2 see everything correctly
    - Server and client movement: same as previous case

    Without SmoothSync and replication movement checked, network lag* on second client :
    - Server movement only: lag appears on client character and on other characters.
    - Client movement only: no lag on client character but other player characters dont move.
    - Server and client movement: every client see the other client lag, but its own character don't lag
    * I simulated lag on this test project with the command "net pktlag=350 PktLagVariance=75 PktLoss=6" executed on the second client right after he was connected to the server. Every test for this project was done directly in the editor, (New Editor Window) with Run dedicated server checked.
    Last edited by Maxime066; 03-24-2020, 03:17 PM.

    Leave a comment:


  • replied
    Are you doing these update client-side or server-side? For a multiplayer game it should preferably be done via the server, hence server authority.

    Leave a comment:


  • replied
    I just tried with everything related to physics and gravity deactivated on my character and it doesn't change anything. Same when I change the movement mode and I tried first the one by default, then flying, then none, then custom.

    I don't see other players falling, they just do not update to their new position at each tick, like the local player does.

    Thanks for the help Dealman, it,s greatly appreciated.

    Leave a comment:


  • replied
    Maxime066 since you're using characters, are they simulating physics? Is it possible that Client 1 might think that Client 2 is falling, while also trying to update its position? Tried changing the movement mode?

    Leave a comment:


  • replied
    Good morning everyone.

    I bought this plugin thinking it would help me with the problem I face but I still need some help.

    I built a multiplayer online game and there's a dedicated server for it. What's special with my game is that the player character is not moved with a controller/keyboard/mouse, but with a device that tells me a distance. Periodically, I get the latest distance from this device and I move my character, following a spline, to a point interpolated from the current position of my player on the spline to the exact position on the spline given a distance from the device. I use a buffer of arround 2seconds of device positions to get the speed. It allows the player to never goes further than what the device tells me because of the buffer and because I move the player with a SetWorldTransform on the component, at each tick. Everything looks smooth locally.

    However, I noticed some lag when I play with other players. ClientA will see his character goes smoothly, but ClientA will see characterB lag. I think it's because I use SetWorldTransform instead of a force or something, and then each tick is not replicated over the network (I move the player locally at each tick with SetWorldTransform as I said). I think that I absolutely need to use SetWorldTransform to stay on the spline and to not go further.

    I tried multiple solutions but none that removes the lag. One of them was to send my buffer of distances of each client to each other client, and let these other players move every character locally (the one they own + the ones of other players). For this I deactivated replicated movement and removed this plugin from the character, and then, on the clients, I tried to move the characters given from GameState, playerArray, rootComponent, but then no character were moved, even the player character. So it seems playerA can't even move playerB locally with replicated movement deactivated. So this solution won't work.

    I tried this plugin but may be it's not designed to work with SetWorldTransform ? Or may be it's because I'm trying to move characters? Anyway, if you have just an idea of a solution, let me know. Thank you.

    Leave a comment:


  • replied
    I'm getting some weird behaviour trying to attach an actor to the hand of the player. It'll be offset a fair bit and at some rotations start to "vibrate" a lot.


    This only happens for the clients, not the server. I don't get this behavior if I delete the SmoothSync component. Any suggestions?

    Leave a comment:


  • replied
    Originally posted by MikeRPG View Post

    Why are you setting ownership to the parent? Why not just the let them stay attached without changing ownership?
    Because it was suggested to me and i was out of options.

    Leave a comment:


  • replied
    Originally posted by Evolover42 View Post
    Hi. I am having a weird issue with ownership. I'm not too familiar with it though. I have some Pawns that SmoothSync works on, but when i attach another actor to the pawn and set the owner of the attached actor to the Pawn (self), SmoothSync not longer works on that pawn. Thanks.
    Why are you setting ownership to the parent? Why not just the let them stay attached without changing ownership?

    Leave a comment:


  • replied
    fuestrine It's certainly a strange one, will jump into your discord.

    Thanks

    Leave a comment:


  • replied
    Hi. I am having a weird issue with ownership. I'm not too familiar with it though. I have some Pawns that SmoothSync works on, but when i attach another actor to the pawn and set the owner of the attached actor to the Pawn (self), SmoothSync not longer works on that pawn. Thanks.
    Last edited by Evolover42; 02-14-2020, 04:36 AM.

    Leave a comment:


  • replied
    gooberCP It looks like you found the discord. Let me know if you're still having issues. I'm still not really sure what the issue with yaw is but the continuing to fall after landing thing sounds like it could be a real bug as I've fixed a similar issue in the past.

    Also I'm not sure how SmoothSync could be doing anything to delay the replication of variables. If anything I would expect the opposite problem as replicating variables should happen ASAP whereas smooth sync stuff is all buffered and delayed by interpolation back time.

    Leave a comment:

Working...
X