summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-16 22:56:16 +0100
committerGitHub <noreply@github.com>2020-01-16 22:56:16 +0100
commit6fd4afa96b4d4a2af5d2caee97625a16ed18a658 (patch)
treee5c9e3ce3df0980b040c2e61d3ae6cc5b43471f9 /servers/physics_2d
parent8b0e2a409b9c111cf63ac8db0045675f6e8efa4f (diff)
parent8330e70e2cc935a92cf11862b68f6cfa0ce66fe8 (diff)
Merge pull request #33615 from raphael10241024/fix_shape_change
refresh area2d collision when shape changes
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/area_2d_sw.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp
index 110e94d22e..6f09041af8 100644
--- a/servers/physics_2d/area_2d_sw.cpp
+++ b/servers/physics_2d/area_2d_sw.cpp
@@ -46,6 +46,9 @@ Area2DSW::BodyKey::BodyKey(Area2DSW *p_body, uint32_t p_body_shape, uint32_t p_a
}
void Area2DSW::_shapes_changed() {
+
+ if (!moved_list.in_list() && get_space())
+ get_space()->area_add_to_moved_list(&moved_list);
}
void Area2DSW::set_transform(const Transform2D &p_transform) {