Screen position out of view frustum (screen pos 1919.040039, 653.760010) (Camera rect 0 0 1920 1080) UnityEngine.SendMouseEvents:DoSendMouseEvents (int), почему возникает эта ошибка?
код управления камерой:
using UnityEngine;
public class CameraController : MonoBehaviour { public float sensitivity = 2.0f; public float maxYAngle = 80.0f;
UnityEngine.SendMouseEvents:DoSendMouseEvents (int), почему возникает эта ошибка?
код управления камерой:
using UnityEngine;
public class CameraController : MonoBehaviour
{
public float sensitivity = 2.0f;
public float maxYAngle = 80.0f;
private float rotationX = 0.0f;
private void Update()
{
float mouseX = Input.GetAxis("Mouse X");
float mouseY = Input.GetAxis("Mouse Y");
transform.parent.Rotate(Vector3.up * mouseX * sensitivity);
rotationX -= mouseY * sensitivity;
rotationX = Mathf.Clamp(rotationX, -maxYAngle, maxYAngle);
transform.localRotation = Quaternion.Euler(rotationX, 0.0f, 0.0f);
}
}