public void EnterVehicle(GameObject vehicle) { cockpit = vehicle.GetComponentInChildren <VehicleCockpit>(); if (cockpit != null) { isInVehicle = true; canEnterVehicle = false; canEnterPlanet = false; playerMovement.EnableControls(false); playerLook.EnableLook(false); camera.enabled = false; cockpit.LoadPlayerIntoVehicle(gameObject); } }