summaryrefslogtreecommitdiff
path: root/scene/2d/collision_object_2d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-08-21 21:46:04 +0200
committerGitHub <noreply@github.com>2018-08-21 21:46:04 +0200
commited10ff65fd741263ab44eeb75b198b3a41c2eb67 (patch)
treee00b29d4217400d8ae1a231d2ca5eac567c48da9 /scene/2d/collision_object_2d.cpp
parent65c8a491221efdb4fd26ff230f22b541a2511483 (diff)
parent20dc63054f7846a9179b546dd3f02096ff4c6609 (diff)
Merge pull request #21245 from RandomShaper/fix-physics-canvas-xform
Take CanvasLayer transform into account for 2D physics
Diffstat (limited to 'scene/2d/collision_object_2d.cpp')
-rw-r--r--scene/2d/collision_object_2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 1e2184bd41..52d04ac10a 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -38,7 +38,7 @@ void CollisionObject2D::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
- Transform2D global_transform = get_global_transform();
+ Transform2D global_transform = get_global_transform_with_canvas();
if (area)
Physics2DServer::get_singleton()->area_set_transform(rid, global_transform);
@@ -64,7 +64,7 @@ void CollisionObject2D::_notification(int p_what) {
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
- Transform2D global_transform = get_global_transform();
+ Transform2D global_transform = get_global_transform_with_canvas();
if (only_update_transform_changes && global_transform == last_transform) {
return;