Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

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

  • replied
    a) Can you explain the concept behind Owned and not owned actors. By what is is determinated?

    b) Can I still use "UFUNCTION(Server, Reliable, WithValidation) void ServerAddTorque(FVector Torque);" forcing the physics being done server side? Or is is it different scenario when using this plugin?

    Leave a comment:


  • replied
    trshman
    1) I'm not entirely sure how Unreal does their syncing. I'm pretty sure Unreal's syncing doesn't keep a buffer of states though like Smooth Sync does, so if there's an FPS drop or something I could see Unreal's syncing having issues. Also I don't think the position is solely determined by a single system, so your objects can become out of sync then it will correct to what it thinks it should be.
    Smooth Sync doesn't get out of sync in the same manner that Unreal's syncing does.

    2) I'm not sure if you are doing something wrong and if it'll fix your specific issue but Smooth Sync does work with rolling ball template. There's no one complaining about lag and the rolling ball template is shown with Smooth Sync in the tutorial video too.

    3) It works by sending positions over the network and lerping between them. For Owned Actors it sends transform from owner to non-owners (owner determined transform). For Unowned Actors it sends transform from from server to clients (server determined transform).

    Let me know if you have any other questions or if you want more explanation on anything.

    Leave a comment:


  • replied
    So I started with this default rolling ball template. Set "Number of players" = 2, checked "Run dedicated server", as well dropped additional "Player start" component in the map. So I realized nothing is replicated trough the network. So what I did was adding:

    ```
    UFUNCTION(Server, Reliable, WithValidation)
    void ServerAddTorque(FVector Torque);
    ```

    to run physics on server side, so its then replicated on all clients. And it worked, but when I really play around with the balls I can see them Laging (getting stuck and jumping to next pos). So my question is:

    1) What is this LAG? I mean, it's all on same machine!
    2) Can "Smooth Sync" help to correct this and how?
    3) And how it really works? The doc says just drop the component to the actor. But how then does it know what to sync and what not?

    Leave a comment:


  • replied
    Syed
    1) It now handles unowned actors differently. It works as follows:
    Owned Actors: Sends transform from owner to non-owners.
    Unowned Actors: Sends transform from from server to clients.

    2) Use Unreal's SetOwner() function to set the owner to the client that you want to determine the position.

    Let me know if you have any questions.
    Last edited by fuestrine; 08-27-2019, 05:02 PM.

    Leave a comment:


  • replied
    Hi,
    I can probably answer this myself by doing experiments (cant afford to read all 13 pages post here lol), but here is the question:

    1) What happened to 'Set Owner To Server'?

    2) This is just typical situation. A blueprint that I want the transform send from a particular client to server and then replicated to the rest.. So how to differentiate between normal replication (using server values, replicated to all clients) vs this case?
    Last edited by Syed; 08-27-2019, 05:28 AM.

    Leave a comment:


  • replied
    e3pojedi
    Smooth Sync does set rotation so it could be an issue with Smooth Sync.

    If it's easily repeatable, turn off Rotation Syncing and see if you still get the issue.

    If you don't get the issue when turning Smooth Sync's Rotation Syncing off, let me know how you are causing the issue and I'll see if I can fix it up.

    Leave a comment:


  • replied
    Hey fuestrine ,
    My project is crashing, and the message logs seem to show this error:

    Code:
    [2019.08.22-10.21.18:554][288]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 8.477944 Yaw 130.352570 Roll -111.029167
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:554][288]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.145572 Yaw 147.404251 Roll -111.029152
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:635][290]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.178746 Yaw -126.172890 Roll -0.015490
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Small_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Small_01' for bone 'SM_Veh_Car_Small_01'
    [2019.08.22-10.21.18:636][290]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.169621 Yaw -109.397362 Roll -0.015246
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Small_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Small_01' for bone 'SM_Veh_Car_Small_01'
    [2019.08.22-10.21.18:657][292]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.051035 Yaw -132.987137 Roll -0.391541
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Small_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Small_01' for bone 'SM_Veh_Car_Small_01'
    [2019.08.22-10.21.18:658][292]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.162647 Yaw -132.498154 Roll -0.391633
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Small_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Small_01' for bone 'SM_Veh_Car_Small_01'
    [2019.08.22-10.21.18:669][293]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch -0.099598 Yaw 33.704178 Roll 0.275303
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:669][293]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch -0.123852 Yaw 29.297504 Roll 0.275139
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:670][293]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.126598 Yaw 150.383041 Roll -0.738056
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:670][293]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.641601 Yaw 149.833832 Roll -0.737628
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:713][297]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.566086 Yaw 64.584778 Roll -0.046906
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:713][297]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.210855 Yaw 33.287903 Roll -0.064026
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Medium_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Medium_01' for bone 'SM_Veh_Car_Medium_01'
    [2019.08.22-10.21.18:959][318]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.460915 Yaw 85.651772 Roll 0.222979
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
     on PhysicsAsset 'SK_Veh_Car_Van_01_PhysicsAsset' in SkeletalMesh 'SK_Veh_Car_Van_01' for bone 'SM_Veh_Car_Van_01'
    [2019.08.22-10.21.18:959][318]LogPhysics: Warning: UpdateKinematicBonesToAnim: Trying to set transform with bad data Rotation: Pitch 0.368400 Yaw 41.207272 Roll 0.216637
    Translation: -nan -nan -nan
    Scale3D: 0.700000 0.700000 0.700000
    Could this be due to Smooth Sync?
    Thanks!

    Leave a comment:


  • replied
    Aeries
    Sure. Let me know how to recreate it and I'll see what I can find out.

    Leave a comment:


  • replied
    fuestrine that didn't help. If you like, I can DM you how I created this particular locomotion system and see if you can recreate the issue?

    Leave a comment:


  • replied
    Aeries
    Try increasing the TimeCorrectionSpeed variable. The higher that is, the quicker it will react to changes in latency, too high and it will jitter from normal movement though. Let me know if that helps. If it doesn't, I'll have to try to recreate the scenario and see what I can find.
    Last edited by fuestrine; 08-14-2019, 05:17 PM.

    Leave a comment:


  • replied
    Hey fuestrine - love this plugin. It's working very well. I have an issue, however, I'm hoping we can resolve. I've set up a root motion character and I've plugged in the smooth motion component. Almost everything works brilliantly right 'out of the box', except that when latency scales up, the component seems to fall behind in syncing transforms. So in-engine, I can run from A to B with no ping latency just fine. Add a latency of 500, and the animations will play to move and stop just fine as I'd expect, but the component doesn't start nor stop syncing until almost a full second after the anim events, causing a delay on clients from start, and a 'slide' effect after the player anims appear to stop moving. Thoughts?

    Leave a comment:


  • replied
    tschmi22
    Sorry I don't know of any way. You can try to copy and paste the code out into new scripts that you make in your projects though.

    Leave a comment:


  • replied
    Samuel Brunner
    Smooth Sync will only replicate the position of replicated objects. It won't spawn anything.

    Leave a comment:


  • replied
    Hello,

    Say i'm firing a bullet from player 0, will it create the bullet on the dedicated server as well, without sending an event to the server like the usual way ?

    Or will it replicate my vehicule position ?

    Leave a comment:


  • replied
    I'm trying to share this Plugin with my team for a collaborative game project. Is there a good way to do this? I tried adding SmoothSync as a project plugin but it doesn't show up in the "Edit-Plugins - Project Plugins" List. Any info would be very helpful! Thanks!

    Leave a comment:

Working...
X