Unity network transform authority problem

Hi, I’m making a co-op game where player movement is based on physics. I’m currently having trouble synchronizing player position between clients. I’m using a network transform component with a rigidbody, which I’m overriding on a client that doesn’t have authority using the rigidBody.MovePosition(newPos) method.
According to the documentation, if the client/host doesn’t have authority, the position shouldn’t be overwritten, but for some reason when a new client joins, the position of other clients is overwritten (the new client doesn’t have authority over the networktransform of other clients).

Why is this happening? Or maybe I should use another way to write a custom rigidbody synchronization?

Bad idea, unless you a) want whacky movement or b) don’t mind a serious challenge, the quest-for-holy-grail kind of serious. :wink:

NetworkRigidbody always sets non-authoritative components to kinematic so that they just follow the authority’s physics simulation. By default, all physics is simulated entirely on the server (host). Hence every rigidbody player will experience the full latency when moving.

To alleviate this, you can toggle IsKinematic back off but then players collisions will not match the server-side simulation. Then players bodies should respond to forces again. Also you still need a NetworkTransform that is client authoritative and I believe you may have to do the same authority overriding for NetworkRigidbody by subclassing it.

In essence, networked physics is incredibly challenging and requires locally simulating the physics world and then reconciliate any behaviour for other clients. Or some other less excessive solution if you can live with some drawbacks, such as players not colliding with other players respectively they will jitter if they collide. At least in a coop game you can cheat a lot.

If you want the full run-down of creating great networked physics, it’s instructive to watch this:

I found it is just old bug, there is solution: