ошибка: Screen position out of view frustum (screen pos 889.680603, 594.398010) (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;
Screen position out of view frustum (screen pos 889.680603, 594.398010) (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;
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);
}
}
1 фото это без проблемы, 2 с проблемой