summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorgreenfox <ryantleverenz@gmail.com>2020-11-22 18:09:33 -0600
committergreenfox <ryantleverenz@gmail.com>2020-11-22 18:09:33 -0600
commitb9c08977132a40b64c85d8522c01015900d4b1b9 (patch)
tree6d501ce53ac5b5b35baea3ca30d86cab63fcd0d4 /scene/2d
parent6bd4074f769b9fd1eb4c4e06bf83a414f9d4ecc7 (diff)
fixed Camera2D rotation with non-square zoom
Diffstat (limited to 'scene/2d')
-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 e22b24c16f..79b0b64efb 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()*/);
/*