diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-01 11:37:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-01 11:37:28 +0100 |
commit | 3e649f8cba9408d7646c591a19fed6f270827602 (patch) | |
tree | 5e0e6b016931bbc98ecff5300fa4c555e48dce45 /scene | |
parent | 5aa96b72c7a379d5b869168933153ffb0820f125 (diff) | |
parent | cbb8930813e891c67a4c917b20bd98317e182f54 (diff) |
Merge pull request #34665 from timothyqiu/camera-fov
Clamps fov/size for Camera gizmo
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/camera.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index a1794d34a7..bbc81afe3d 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -583,12 +583,14 @@ Camera::Projection Camera::get_projection() const { } void Camera::set_fov(float p_fov) { + ERR_FAIL_COND(p_fov < 1 || p_fov > 179); fov = p_fov; _update_camera_mode(); _change_notify("fov"); } void Camera::set_size(float p_size) { + ERR_FAIL_COND(p_size < 0.1 || p_size > 16384); size = p_size; _update_camera_mode(); _change_notify("size"); |