Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Transform Sync Mode set to "Sync Transform" causes extreme jitter!

Discussion in 'Multiplayer' started by ArmoredSentinel, Mar 16, 2018.

  1. ArmoredSentinel

    ArmoredSentinel

    Joined:
    Aug 13, 2017
    Posts:
    12
    In my simple multiplayer game, the enemies move along the same fixed path over and over using a Vector3.Lerp(). It works perfectly for the host, but when I connect as a client, the positions of the enemies are 100% accurate, but they are jittering like crazy.

    If I set them to Sync RigidBody3D, it's perfectly smooth, but yet far from accurate. The enemies would always start at their starting position when the client connects to it, and yet not their current position.

    I would rather work with Lerp() and not velocity because velocity is more tricky to handle when it comes to tracking their destinations and such, but I can't find any good solutions on how to simply make Sync Transform smooth. I tried playing around with the snap threshold and interpolation factor, nothing works.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    My experience is you can't make the built in NetworkTransform smooth and accurate, and you get a 3rd party sync script or write your own.
     
    Deleted User likes this.
  3. ArmoredSentinel

    ArmoredSentinel

    Joined:
    Aug 13, 2017
    Posts:
    12
    Alright, I managed to make a workaround using velocity and sync rigidbody 3D. Thanks.