diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2019-12-29 11:36:57 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2019-12-29 11:39:04 +0800 |
commit | cbb8930813e891c67a4c917b20bd98317e182f54 (patch) | |
tree | 0c74aba27ab93dc3d582eb18edf2a9e6dfbaea1d /scene | |
parent | 318c69351624f7794c51b5385d252af397c0404a (diff) |
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 4d9bb69778..8f8d54eb9c 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"); |