diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-28 18:37:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 18:37:10 +0200 |
commit | c4d7a5d22a8c4f88966d43076266f26a52987bf6 (patch) | |
tree | 45c0d40e10fbd6b8b02d33189e7ff2af1973b415 /scene | |
parent | 2e05cc3314d0fd04f0e151ad0a827b34b28d8ece (diff) | |
parent | e61dc6bb0498e2c93d510be6c1f7e38fd94ae052 (diff) |
Merge pull request #63580 from madmiraal/fix-63330
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/camera_2d.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 76b354805c..c43a796170 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -247,8 +247,8 @@ void Camera2D::_notification(int p_what) { add_to_group(canvas_group_name); _update_process_callback(); - _update_scroll(); first = true; + _update_scroll(); } break; case NOTIFICATION_EXIT_TREE: { @@ -439,7 +439,9 @@ void Camera2D::clear_current() { void Camera2D::set_limit(Side p_side, int p_limit) { ERR_FAIL_INDEX((int)p_side, 4); limit[p_side] = p_limit; + Point2 old_smoothed_camera_pos = smoothed_camera_pos; _update_scroll(); + smoothed_camera_pos = old_smoothed_camera_pos; } int Camera2D::get_limit(Side p_side) const { |