Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

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

    fuestrine I presume that I need to build from source in order to modify those lines of code?

    Comment


      GuacFrog
      I heard that was one way. I also heard you could delete the intermediate and binary files from the plugin itself, but that never worked for me.

      The way I edit engine plugins is I bring them into my project.
      I do this:
      1. Create a SmoothSync c++ file in your project.
      2. Create a State c++ file in your project.
      3. Copy over the SmoothSync.h SmoothSync.cpp State.h State.cpp from the Private and Public folders at Engine\Plugins\Marketplace\SmoothSync\Source\SmoothSyncPlugin
      into wherever it made them in your project folder
      4. Then change SMOOTHSYNCPLUGIN_API in the .h files to YOURPROJECTNAMEINALLCAPS_API

      Then you will have the plugin as part of your project and you can edit and compile to your heart's content.
      Sync your transforms Smoothly across the network.

      Comment


        Hi
        I try to create a setup where the server handles the movement.
        So when i right click, the client sends a request to the server, and the server uses a "Simple AI move to" to the designated location.
        In the default UE setup this works, and replicates correctly, with jittering at the client.
        When i add the smoothsync component, the client doesn't move neither in client or sever window.
        What am i doing wrong?

        Comment


          When switching FROM client owner TO server owner of an actor with smooth sync (SetOwner(nullptr)), there is a sudden 'jump'.

          The smooth sync actor jumps FROM the location that the CLIENT left it, over to the location where the actor was LAST owned by the SERVER, and then back to the location where the client left it.

          This jump is very unpleasant. I realize that it may be a hard issue to solve. However, in my case, the actor will ONLY switch from client to server owned if the actor is NOT moving. Because of this, there should be some way to solve this problem.

          Any ideas?
          Last edited by GuacFrog; 07-01-2020, 06:38 PM.

          Comment


            Fjordhoj
            Smooth Sync uses ownership to determine who is the authority of the position. It sounds like your client owns your actor. Set the server as the owner or have no owner to have the server determine the position. Then if you move it on the server, that position will be sent out to all clients.
            Let me know how it goes or if you think I misunderstood.
            Sync your transforms Smoothly across the network.

            Comment


              GuacFrog
              Call SmoothSync.ClearBuffer() on all instances of the actor after you change owners.
              Or in your case, maybe call it before if you didn't call it afterward on the previous ownership change because it seems to have an old position in the buffer from when the server was previously the owner.

              Let me know how it goes or if you think I misunderstood.
              Sync your transforms Smoothly across the network.

              Comment


                fuestrine Is there an easty way to do this? I imagine using the "Set Owner" node, but which actor do i plug in?

                Comment


                  Fjordhoj
                  Yes, SetOwner is what you want. You'll most likely want to pass in the most parent actor of the actor you are trying to sync across the network.
                  Sync your transforms Smoothly across the network.

                  Comment



                    Tried several ways. Different ways of spawning, assigning controllers, various assingment of moving (Server, multicast)
                    Nothing seems to work when using AI movement, and can't get the client to do anything.
                    When i enable movement replication on the BP, and remove SmoothSync, the client moves as desired again, but with lagging.

                    Click image for larger version  Name:	Udklip.PNG Views:	0 Size:	47.3 KB ID:	1783622‚Äč

                    This is the movement on the character called from the controller.
                    Last edited by Fjordhoj; 07-02-2020, 05:48 PM.

                    Comment


                      Fjordhoj
                      I would confirm that the owner is set with GetOwner(). My best guess is that maybe you set the owner of an Actor but you are trying to move your Controller instead. Let me know how it goes.

                      If there's an Unreal Template that does what you are trying to do, let me know and I can take a look at that and see if Smooth Sync has any unexpected issues. But I think the above is probably your issue.

                      Let me know how it goes.
                      Last edited by fuestrine; 07-02-2020, 06:03 PM.
                      Sync your transforms Smoothly across the network.

                      Comment


                        The "Top Down" template does not work out of the box with SmoothSync, as the other ones does. Tested "Top Down" and the Roller Ball. RollerBall worked as it should, Top Down didn't.

                        Comment


                          Fjordhoj
                          OK. I'll take a look and see what I can find.
                          Sync your transforms Smoothly across the network.

                          Comment


                            Any results yet?

                            Comment


                              Fjordhoj
                              Can you send me the project? I'm not really sure how to set it up like you have it set up. I'm not too familiar with blueprints.

                              It doesn't seem to work with me with your setup for the second player with or without Smooth Sync.
                              Last edited by fuestrine; 07-12-2020, 11:26 PM.
                              Sync your transforms Smoothly across the network.

                              Comment


                                Sure. Where should i send it to?

                                Comment

                                Working...
                                X