Rigidbody Synchronization Issues.

Options
Hello!
I am working on a competitive racing game, and there is a hard requirement for realistic physics so we need to use Rigidbodies. There are cars in an arena and they are supposed to collide with each other (kind of like Rocket League, but without the soccer aspect). Here's what I've done so far:
1) Created a state for the car (just the transform at the moment, which is interpolated and has the default teleport treshold)
2) Created a command for the player input (input: horizontal axis, vertical axis, handbrake; output: position, rotation, rigidbody's velocity)
As a controller, I am using the default car controller from Unity's Sample Assets package, so it able to give me new variables for the output.

The connection process is fine, cars are moving as they should, but the problem comes when 2 or more cars collide violently, some clients desync and see other players differently (like floating in mid air), even if the cars involved in the collision are synchronized correctly.

As a note, the server is Auth, it owns all the prefabs, and only lends control to the players as they arrive.

Comments

  • stanchion
    Options
    I would take a look at the Auth Rigidbody example from the Sample Pack.

    Here is the main script from it. https://gist.github.com/herpdederp/d27ca61162c0a854cc942795c8eaae6a
  • @stanchion thank you for your response!

    I've downloaded the Sample Assets package from the store, created a new Unity project, as specified in the readme, added the AuthRigidbody Scene and tried it out on the same PC with the editor as server + 3 clients.

    In the example, almost all the clients see something completely different, spheres merge into each other, and there is some solid rubber banding on some clients when i'm controlling the server player. Here are is a screenshot:


    Is there a solution for the desync(each client seeing something completely different)?

  • stanchion
    Options
    I would take a look at the other sample I mentioned. This one is more complex. I am not clear on the issue you're running into in the screenshot you posted, here is a test I did https://www.youtube.com/watch?v=78XrhX3msNI
  • The issues that I am having is that the clients are seeing other clients differently(position), even if they are stationary and there shouldn't be any difference from the latency because those players stayed in that place for some time.