Is it possible to have a smooth movement sync ?

Hi,

I see a lot of people complaining about movement synchronization, i tried the first with the NetworkTransform component theni tried a custom code with lerp, that worked very well with photon.

the result are allways horrible. Even when the host and the client are on the same computer, i dont want to think about the result on separate computers.

Any information from unity team about that would be good:
Is it even possible to have a smooth movement sync ?

thx

Need more information. Are you using a Rigidbody? I use Rigidbody and alter its velocity via code. I get smooth synchronization. I just had to up my Network Send Rate to the max value (29) on the NetworkTransform component.

Hi DRRosen3,

my characters are using characterControllers, but i would rather use transform to move them.
I am making a moba like game, i got allways around 60characters moving at the same time, i cant afford to up the send rate, there must be an other solution.

As i said, i was using this way with PUN and it was working very well, it should with Unet too.

Why can't you "afford" to up the send rate?

I found that using the Network Transform and trying to sync the transform also was very bad, as Paradoks said. I changed it to using the Rigidbody and everything was extremely smooth. Luckily, all of my objects have and use a rigidbody, so I'm able to use this setting. But I'd rather sync via the transform as well -- however it didn't work at all for me.

The problem with trying to sync Transform is that it has no prediction. When you sync a Rigidbody it has a sense of prediction on what should be happening to the GameObject. Look at it this way... If the server sends a client one message telling it to set the Rigidbody's velocity to x amount...the client will begin to propel the Rigidbody in that fashion, and it will continue to do so until the server sends new information. So the client is able to predict where the GameObject should be on the next x amount of frames. So if (a minimal amount of) data gets lost in package transfer from the server, the GameObject should still be in the correct spot based on that prediction.

When you sync Transform you're just telling the GameObject that on x frame you should be in this spot. So if data isn't transferred fast enough, or if any amount of data gets lost in package transfer, you're going to have very choppy movement of that GameObject.

@DRRosen3

- I can't afford to up the send rate because it would raise too much my bandwith.
- the strange thing is, as i said before, it was possible to have a smooth transition using photon+ why isn't that possible with unet over over the home network !?

With UNet presently only really supporting 16 players at most, if you raising your send rate causes too much bandwidth then smooth movement synchronization isn't your real problem.

If you want to smooth player movment take a look at these tutorials http://forum.unity3d.com/threads/unity-5-unet-multiplayer-tutorials-making-a-basic-survival-co-op.325692/

1 Like