Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

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

  • replied

    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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.

    Leave a comment:


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

    Leave a comment:


  • replied
    Originally posted by fuestrine View Post
    Nonlin
    I'm not sure what "bodies in a ragdoll" are, but it'll sync anything with a Transform you can see in the details tab.
    The way I assume a ragdoll would work is you'd only want to sync the Actor Transform and then the limbs and stuff would flop around. You wouldn't want to sync each joint anyway.
    I do want to sync each joint lol, sounds like it can't bummer.

    Leave a comment:


  • replied
    Nonlin
    I'm not sure what "bodies in a ragdoll" are, but it'll sync anything with a Transform you can see in the details tab.
    The way I assume a ragdoll would work is you'd only want to sync the Actor Transform and then the limbs and stuff would flop around. You wouldn't want to sync each joint anyway.

    Leave a comment:


  • replied
    Will this work to rep all bodies in a ragdoll?

    Leave a comment:


  • replied
    GuacFrog
    Maybe changing line 1896 of SmoothSync.cpp into:
    if (insertPos + 1 < stateCount)
    {
    state->movementMode = stateBuffer[insertPos + 1]->movementMode;
    }
    might solve it.

    Sorry but my day job has been crushing me lately and I don't really have time to try to reproduce the issue and get a good fix right now.

    Let me know how that goes though. My free time should start opening up next weekend for me to take a true deep look. Feel free to ask questions here though and I should have time to answer.

    Leave a comment:


  • replied
    fuestrine Any ideas on solving this bug?

    Leave a comment:


  • replied
    This crash occurs when calling SetOwner on the item with SmoothSync. \
    Dedicated server with 2 players.

    The image of the log is attached.
    Last edited by GuacFrog; 06-16-2020, 12:24 AM.

    Leave a comment:

Working...
X