Melonskoy, попробуйте проверить, правильно ли вы настроили ограничение камеры в Unity. Возможно, вы где-то допустили ошибку. Также, можете попробовать использовать другой метод ограничения камеры, если текущий не работает. Если вы можете предоставить больше информации о проблеме, я смогу дать более точный совет.
Вероятно, я опоздал с ответом using UnityEngine; public class CameraController : MonoBehaviour { Quaternion startRotation; float horizontal; float vertical; private void Start() { startRotation = transform.rotation; } private void Update() { horizontal += Input.GetAxis("Mouse X") * SettingsManager._sensitivity; vertical += Input.GetAxis("Mouse Y") * SettingsManager._sensitivity; horizontal = Mathf.Clamp(horizontal, -60.0f, 60.0f); // То самое ограничение vertical = Mathf.Clamp(vertical, -60.0f, 60.0f); GameObject.FindWithTag("MainCamera").transform.rotation = startRotation * transform.rotation * Quaternion.AngleAxis(-vertical, Vector3.right); transform.rotation = startRotation * Quaternion.AngleAxis(horizontal, Vector3.up); } } CSHARP using UnityEngine; public class CameraController : MonoBehaviour { Quaternion startRotation; float horizontal; float vertical; private void Start() { startRotation = transform.rotation; } private void Update() { horizontal += Input.GetAxis("Mouse X") * SettingsManager._sensitivity; vertical += Input.GetAxis("Mouse Y") * SettingsManager._sensitivity; horizontal = Mathf.Clamp(horizontal, -60.0f, 60.0f); // То самое ограничение vertical = Mathf.Clamp(vertical, -60.0f, 60.0f); GameObject.FindWithTag("MainCamera").transform.rotation = startRotation * transform.rotation * Quaternion.AngleAxis(-vertical, Vector3.right); transform.rotation = startRotation * Quaternion.AngleAxis(horizontal, Vector3.up); } }