From 5521b93750977b3c283672f478360b866e8de202 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Thu, 31 Mar 2022 16:06:02 +0200 Subject: [PATCH] Fix that collision objects ignore canvas transform This aligns collision areas with visual areas within a viewport --- scene/2d/collision_object_2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index 50863f2c4de..c503de2d59c 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -81,7 +81,7 @@ void CollisionObject2D::_notification(int p_what) { return; } - Transform2D global_transform = get_global_transform(); + Transform2D global_transform = get_global_transform_with_canvas(); if (area) { PhysicsServer2D::get_singleton()->area_set_transform(rid, global_transform);