Updated Camera2D::set_zoom() function error message
Updated it so that the error condition is accurate to what the error description describes, and the editor won't be flooded with errors if you have a non-zero low zoom level.
This commit is contained in:
parent
621cadcf65
commit
e71bdfa176
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ void Camera2D::_update_process_callback() {
|
|||
|
||||
void Camera2D::set_zoom(const Vector2 &p_zoom) {
|
||||
// Setting zoom to zero causes 'affine_invert' issues
|
||||
ERR_FAIL_COND_MSG(Math::is_zero_approx(p_zoom.x) || Math::is_zero_approx(p_zoom.y), "Zoom level must be different from 0 (can be negative).");
|
||||
ERR_FAIL_COND_MSG(p_zoom.x == 0 || p_zoom.y == 0, "Zoom level must be different from 0 (can be negative).");
|
||||
|
||||
zoom = p_zoom;
|
||||
zoom_scale = Vector2(1, 1) / zoom;
|
||||
|
|
Loading…
Reference in a new issue