Skipping updating the transform of this Rigidbody

My players can spawn networked items (through ServerRpc) that have rigidbodies and start falling as soon as they are spawned, with a little animation. They have a NetworkObject, NetworkTransform, and NetworkAnimator (but no NetworkRigidbody, since I set the rigidbodies to kinematic for all clients – though I tried and adding a NetworkRigidbody changes nothing). When the host does this, it works perfectly on all clients. When a client does this, it sometimes works perfectly, but most times all of the following happens:

  • The item is spawned for everyone
  • The animation plays on the server, but not on the clients
  • The item hangs at its spawned position for everyone, and the server constantly produces the error “Skipped updating the transform of this Rigidbody because its components are infinite”

However, I checked, and they are not. The positions and velocities of the rigidbodies are perfectly normal and as intended, so is the inertia tensor. The rigidbody is initialized with a force at initialization (VelocityChange) and at no point thereafter (though gravity is on). Logging the velocity shows that it is unchanged even after the error, it doesn’t suddenly become infinite or NaN, it is completely constant from the moment it’s initialized.

The relevant code on the items:

    public override void OnNetworkSpawn() {
        if (!IsServer) {
            myRigid.isKinematic=true;
            myRigid.useGravity=false;
        } //if
        else {
            //Activate fall animation
            myAnim.SetTrigger(animFalling);
            myRigid.AddForce(startVel,ForceMode.VelocityChange);
            myTransform.localScale=new Vector3(0.1f,0.1f,0.1f);
            wasInitialized=true;
        } //else
    } //OnNetworkSpawn

I’m at a total loss as to why this is happening. The only hint I have is that the problem goes away if I completely disable the colliders on the object, though I checked and the item does not collide when they are on (i.e. OnColliderEnter/Stay/Exit do not fire when the colliders are on). Does anyone have any idea?

Finally solved it. The problem was that Update() was being called on the same frame as OnNetworkSpawn(), which led to the transform.localScale being set to 0 for one frame.