Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

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

    Hi,

    I'm facing a problem, and I don't know if that come from Smooth Sync or UE4 engine:

    I use the rolling ball template to do some test, and one thing appear to be problematics, when I Add Radial Force at the impact point between 2 balls, the other ball take like 300-500ms to be impacted by the Radial Force (configured like on the screenshot)



    Click image for larger version  Name:	UE4Editor_20191202_160527.jpg Views:	0 Size:	167.1 KB ID:	1693278

    So, do I do something wrong? I have tried to fire Add Radial Force from the server, nothing happen at all, or by owning client, work exacly with the same problem

    Thanks for the help!
    Last edited by nynjardin; 12-02-2019, 02:55 AM.

    Comment


      bok! FireblitzSpain Both of your issues should be fixed in the latest version that is on the marketplace now. Let me know if you run in to any issues with the new version. Also give our discord channel a try if you're in to that: https://discord.gg/6VpgNQg
      Sync your transforms Smoothly across the network.

      Comment


        nynjardin Generally if you want networked objects to interact well via physics you need them all to be owned by the server. Alternatively you can make sure the force is always applied on the owner and you will be able to move things but you will see delays and weirdness during any physical interactions between actors with different owners. So the trade off is either a delay when players try and interact with things because their interaction needs to be relayed to the server that owns everything, but you'll have smooth and correct interactions between objects; OR delays and weirdness when objects physically interact, but players can interact with objects they own instantly. It will depend on your game which route you go.

        At least I think that's what you're running in to, a 300-500 ms delay is pretty long. Do those two balls have different owners in your scenario? Can you narrow down the test to add the radial force on a keypress instead of collision? I'm wondering if the delay is in applying the force or in detecting the collision itself.
        Sync your transforms Smoothly across the network.

        Comment


          Originally posted by fuestrine View Post
          nynjardin

          At least I think that's what you're running in to, a 300-500 ms delay is pretty long. Do those two balls have different owners in your scenario? Can you narrow down the test to add the radial force on a keypress instead of collision? I'm wondering if the delay is in applying the force or in detecting the collision itself.
          My two balls have they own owner.

          Ok, so, I've tryed what you suggest, see screenshot attached, and, in fact, I have nearly no delay anymore... Have you any idea why? Because of collision? I have set CCD to true for the ball component (with or without, nothing change).

          Should I try to found another way to Add Radial Force that use something else than hit event?



          Click image for larger version

Name:	20191205_091516.jpg
Views:	247
Size:	145.2 KB
ID:	1694393

          I just added these node to the PhysicalBallBP from Rolling Game Mode, nothing else (so, it's very easy to reproduce)

          Thanks for your help!

          Comment


            nynjardin I'm not clear on where that original bp was running. If that is on the owner of the ball you are adding force to you may get better results detecting the collision on the server and using an rpc to add the force on the owner when collision is detected.
            Sync your transforms Smoothly across the network.

            Comment


              Originally posted by fuestrine View Post
              nynjardin I'm not clear on where that original bp was running. If that is on the owner of the ball you are adding force to you may get better results detecting the collision on the server and using an rpc to add the force on the owner when collision is detected.
              Hum, I don't know how to detecting the collision on the server? there is a way to do that? Because, actually, I detect the collision on the client and send all information needed (Location of the Hit and who hit who) to the server who send to hitted client that a Radial Force happening at the impact location and there is the lag.

              My screenshot only show simpliest mechanics, easy to reproduce, from the Physical Ball template present by default in UE4 and this screenshot come actually from the PhysicalBallBP.

              I have also tried to fake colision detection by using distance between2 balls, when distance is less than the ball size, the server fire a Radial Force, but same result, a 300-500ms lag.

              I noticed that when a ball hit another one, the other ball become blur for 1-2 frames like it want to move but is stuck in place then it move half a second later. My internet connection don't let me send vidéo easily, but If you try to reproduce the BP from my first screenshot (top of this page) in PhysicalBallBP, you will see what happen (I know that the BP don't send anything to the server in this case, but the result is the same)

              Comment


                Syed There is a new version out now that may fix the "second time loading in to a level" issues. I'm not totally sure though as I wasn't ever able to replicate the issue, but I did fix some things in related code that seems promising. Let me know if it's fixed for you and if not maybe give me some more details on how you are spawning and changing levels.
                Sync your transforms Smoothly across the network.

                Comment


                  Originally posted by fuestrine View Post
                  Syed There is a new version out now that may fix the "second time loading in to a level" issues. I'm not totally sure though as I wasn't ever able to replicate the issue, but I did fix some things in related code that seems promising. Let me know if it's fixed for you and if not maybe give me some more details on how you are spawning and changing levels.
                  Thank you!.. But it may take some time for me to test it.. I am on 'other areas' of coding..
                  Btw, briefly what has been changed for that fix?

                  Comment


                    Syed I added a bit of code that forces a full resend whenever an "initial" replication happens on an object, which should be every time you load in to a scene. Hopefully that will fix any values that are somehow getting stuck in an incorrect state.

                    Comment


                      Lee.J8 Can you get me a log from when it crashes on the quest? I don't have a Quest to test with myself, but I did just recently re-confirm that it works on Android in general.

                      Comment


                        Hello, a few days ago you asked me in my review of the Marketplace what was not working with the plugin. Here you have a video that shows that the crouch animation is not synchronizing between the client and the server. Also if you look at the legs of the Mannequin shakes while in the server itself do not. All this is synchronized without problem using Unreal's default replication system.

                        Comment


                          FireblitzSpain Thanks for the video. I'm looking in to it.

                          Comment


                            FireblitzSpain Would it be possible for you to send me a copy of that project? The default Third Person Template does not include crouching and I want to make sure I'm setting things up the same way you are.

                            Comment


                              FireblitzSpain I recently submitted a new version of the plugin that should fix the stuttering issues. It should show up on the marketplace soon.

                              I'm a little stumped on the crouching issue though. It seems to me that crouching is handled via replicating the bIsCrouched boolean, so it should work exactly the same regardless of if you are using Smooth Sync or Replicate Movement, since it doesn't seem to depend on Replicate Movement at all. As long as you are setting that boolean on the server it should be replicated and the character should crouch. And it does in fact seem like crouching is happening in that video (that's why the character sort of twitches through the floor for a second), but for some reason the crouch animation isn't playing. I suspect this has something to do with how you are triggering the crouch animation. None of the templates seem to have the crouch action / animation hooked up though so I'm not totally sure what the "right" way to do that is. It seems like you're saying the crouch animation does play for you when you use Replicate Movement though. Is this the case? It would really help if you could either send me your project or walk me through how you've implemented crouching so that it works and plays the animation using Replicate Movement.

                              Comment


                                Originally posted by Anson Kindred View Post
                                FireblitzSpain I recently submitted a new version of the plugin that should fix the stuttering issues. It should show up on the marketplace soon.

                                I'm a little stumped on the crouching issue though. It seems to me that crouching is handled via replicating the bIsCrouched boolean, so it should work exactly the same regardless of if you are using Smooth Sync or Replicate Movement, since it doesn't seem to depend on Replicate Movement at all. As long as you are setting that boolean on the server it should be replicated and the character should crouch. And it does in fact seem like crouching is happening in that video (that's why the character sort of twitches through the floor for a second), but for some reason the crouch animation isn't playing. I suspect this has something to do with how you are triggering the crouch animation. None of the templates seem to have the crouch action / animation hooked up though so I'm not totally sure what the "right" way to do that is. It seems like you're saying the crouch animation does play for you when you use Replicate Movement though. Is this the case? It would really help if you could either send me your project or walk me through how you've implemented crouching so that it works and plays the animation using Replicate Movement.
                                Hi. I've tried the update and it works very well indeed except for the crouch that still doesn't work. Unfortunately I can't share my project because it's my main project. Besides, it is almost a 60gb. project. But I can tell you that the crouch (from the character in the video) belongs to this asset:

                                https://www.unrealengine.com/marketp...tion-system-v1

                                that a few months ago was given as a gift at the Marketplace.

                                As I said, without smooth sync, the crouch replicates without any problem.

                                Comment

                                Working...
                                X