Clamps fov/size for Camera gizmo

This commit is contained in:
Haoyu Qiu 2019-12-29 11:36:57 +08:00
parent 318c693516
commit cbb8930813
2 changed files with 4 additions and 3 deletions

View file

@ -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");