When I launch a client the host loses control of his airplane and both host and client are assigned to the same airplane, none o them can control anything, I also used if(!isOwner) return, I have used network behaviour, collisions are perfect, I can see the other player and the camera is a child of the player prefab, what could be wrong?
I dont know about the controls without seeing more of your script but I had the same problem with clients and hosts being assigned to the same objects - had to put a check on the camera script for my cams and cinemachines, like so
using UnityEngine;
using Unity.Netcode;
using Cinemachine;
public class CameraOwnerChecker : NetworkBehaviour
{
[SerializeField]
private Camera viewCam;
[SerializeField]
private CinemachineVirtualCamera cinamachineCam;
private void Awake()
{
viewCam = GetComponent<Camera>();
viewCam.enabled = false;
cinamachineCam.enabled = false;
}
private void Start()
{
if (IsLocalPlayer)
{
// Debug.Log("Camera is local player. Setting true.");
viewCam.enabled = true;
cinamachineCam.enabled = true;
}
else
{
// Debug.Log("Camera is not local player. Setting false.");
viewCam.enabled = false;
cinamachineCam.enabled = false;
}
}
}
hope it helps!