Owner authoritative network transform interpolates fine on client side but does not on server?

I have a project I am making that used Owner authoritative physics movement and I am getting some strange behavior.

My solution for owner authoritative transforms was the one provided here in the user manual.

using Unity.Netcode.Components;
using UnityEngine;

namespace Unity.Multiplayer.Samples.Utilities.ClientAuthority
{
    /// <summary>
    /// Used for syncing a transform with client side changes. This includes host. Pure server as owner isn't supported by this. Please use NetworkTransform
    /// for transforms that'll always be owned by the server.
    /// </summary>
    [DisallowMultipleComponent]
    public class ClientNetworkTransform : NetworkTransform
    {
        /// <summary>
        /// Used to determine who can write to this transform. Owner client only.
        /// This imposes state to the server. This is putting trust on your clients. Make sure no security-sensitive features use this transform.
        /// </summary>
        protected override bool OnIsServerAuthoritative()
        {
            return false;
        }
    }
}

In my project there is the ability to switch ownership of the plane object from player to player. In the video below I start by having the server (host is the editor copy) have ownership of the plane. As you can see the client side interpolation is working smoothly and great. But, at exactly half way through, I change ownership and hand it over to the client and you can see the interpolation on the host end becomes terrible. I am struggling to find out why this would be so. I also tested a scenario with one host and two connected clients and tried the same test. When i handed ownership over to one of the clients, the other client (non-host) interpolated just fine. It seems to only be the host that cannot interpolate client authoritative network transforms. maybe someone could help me out and look into this?

Hi @Bruugle , thanks for highlighting the issue and sharing the video. Would it be possible for you to open a bug report here? In this way, the team behind Netcode For GameObject will be able to prioritize your fix, and you’ll be automatically updated about its status.

Turns out the jitter was from something i overlooked in my camera code! interpolation is now working as expected.

1 Like