Search Unity

Ball in online pong game not well synchronized

Discussion in 'Multiplayer' started by Rayeloy, Mar 19, 2017.

  1. Rayeloy

    Rayeloy

    Joined:
    Feb 12, 2017
    Posts:
    45
    Hello, I've just started to learn Multiplayer Networking in Unity and I'm trying to turn a complicated pong game I was already developing to online (P2P if possible). I want to know if my ball object needs to be a spawnable by the server. At the moment it is, and It has a Network Transform component with syc rigidbody2d with the maximum value of network send rate. However, the ball is only in the correct position in the host player, the other player sees the ball with lag. How can i correct this? If you need any more information tell me.
     
    Last edited: Mar 19, 2017
  2. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    187
    There will always be latency. Generally, you want to lerp differences between server positions and client.