From 850ee9d4a242fd698b0cdb06ec498d04019ff1b1 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 17 Nov 2021 21:12:34 -0800 Subject: [PATCH] Fix condition on 'jump to limits' logic This is a fix for: #54856 (cherry picked from commit 7257bb6ad00517c586f981ccf65255c9a2303911) --- scene/2d/camera_2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 5425720e103..e714a958404 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -197,7 +197,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[MARGIN_LEFT]) { screen_rect.position.x = limit[MARGIN_LEFT]; }