void Update() { if (player == null) { return; } if (!IsWork) { return; } if (Input.GetKeyDown(KeyCode.E)) { ChangeMouseControl(); } Vector2 inputVector = GetInputVector(); rotationX += inputVector.x * rotationSpeedX * Time.deltaTime; rotationY += inputVector.y * rotationSpeedY * Time.deltaTime; rotationX = rotationX % 360.0f; rotationY = Mathf.Clamp(rotationY, minRotationY, maxRotationY); Vector3 targetPosition = transform.position + KKUtilities.SphereCoordinate(rotationX, rotationY, 1.0f); transform.LookAt(targetPosition); player.transform.localRotation = Quaternion.Euler(new Vector3(0.0f, transform.eulerAngles.y, 0.0f)); }