From b9c08977132a40b64c85d8522c01015900d4b1b9 Mon Sep 17 00:00:00 2001 From: greenfox Date: Sun, 22 Nov 2020 18:09:33 -0600 Subject: [PATCH] fixed Camera2D rotation with non-square zoom --- 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 e22b24c16f3..79b0b64efba 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -198,10 +198,10 @@ Transform2D Camera2D::get_camera_transform() { camera_screen_center = screen_rect.position + screen_rect.size * 0.5; Transform2D xform; + xform.scale_basis(zoom); if (rotating) { xform.set_rotation(angle); } - xform.scale_basis(zoom); xform.set_origin(screen_rect.position /*.floor()*/); /*