Multiplayer Soccer Ball Sync Issue

Options
Hello, I am making Multiplayer soccer ball game with cars like Rocket car league. Cars sync is working properly But Ball is not. When one player is connecting to the match room, the ball works fine, how I want it to. But when multiple clients connect, the ball does not sync properly. Only the master client can use it properly. How can I go about using a shared network object in my game.

Comments

  • Hi @Muhammadshakir,

    you basically have two different ways to solve this problem.

    The first would be, to transfer the ownership of the ball to the client who is interacting with it. While this will solve the original problem, it will create another one: it probably adds lag to the game, because transferring the ownership to another client takes some time.

    The second way would be, to handle the ball only on the MasterClient, for example collisions. This requires an overall good synchronization of the objects, which might be pretty hard to achieve. When all clients are running more or less the exact same simulation, you are fine with handling the ball just on the MasterClient and let him send the required updates to the other clients. You can take a look at the Lag Compensation documentation page and see, if you can use it to improve the objects' synchronization.