I am learning unity netcode following the video tutorial by CodeMonkey on YouTube and I am using the third-person controller asset for the characters. I have an issue when I try to add the third-person controller. I added the network object and client network transform on the player armature prefab, made the third-person controller script extend NetworkBehaviour, also added the IsOwner check in update method. When I join as a host, everything works fine. The character can move, jump, and run. When I join as the client, the client does not move at all. Does anyone have any idea why this problem is happening?
I had this same issue. Turns out the movement on the client does actually work but only using a controller for input. Using the keyboard does nothing for me. I haven’t found a fix to get keyboard input on the client but test to see if the syncing is actually working in your case. I will update if I figure it out a full fix.
Update: I got it working by disabling the Player Input component in the inspector and instead enabling it in OnNetworkSpawn() in the ThirdPersonController.cs script.
public override void OnNetworkSpawn()
{
base.OnNetworkSpawn();
if (IsClient && IsOwner)
{
_playerInput = GetComponent<PlayerInput>();
_playerInput.enabled = true;
_cinemachineVirtualCamera.Follow = transform.GetChild(0);
}
}