summaryrefslogtreecommitdiff
path: root/scene/2d/camera_2d.cpp
diff options
context:
space:
mode:
authorEric <github.kuphar@aleeas.com>2021-11-17 21:12:34 -0800
committerEric <github.kuphar@aleeas.com>2021-11-17 21:12:34 -0800
commit7257bb6ad00517c586f981ccf65255c9a2303911 (patch)
treeb10be47fd8737c8f31db85788cd4f35d2d430081 /scene/2d/camera_2d.cpp
parent15062513c01a835f59d9c905e5e65a7002d6c370 (diff)
Fix condition on 'jump to limits' logic
This is a fix for: #54856
Diffstat (limited to 'scene/2d/camera_2d.cpp')
-rw-r--r--scene/2d/camera_2d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index bf5671be19..b6902686fe 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -176,7 +176,7 @@ Transform2D Camera2D::get_camera_transform() {
Rect2 screen_rect(-screen_offset + ret_camera_pos, screen_size * zoom);
- if (!limit_smoothing_enabled) {
+ if (!smoothing_enabled || !limit_smoothing_enabled) {
if (screen_rect.position.x < limit[SIDE_LEFT]) {
screen_rect.position.x = limit[SIDE_LEFT];
}