diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2022-07-28 15:32:45 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2022-07-28 15:32:45 +0100 |
commit | e61dc6bb0498e2c93d510be6c1f7e38fd94ae052 (patch) | |
tree | 669f4516f5389888ea88b828a7ba96ef18eddada | |
parent | 3f83c3a0ac95f42b1fcc22480a8190f7eedc698c (diff) |
Ensure changes to Camera2D's limits don't affect smoothed_camera_pos
-rw-r--r-- | scene/2d/camera_2d.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index ade8534112..c43a796170 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -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 { |