Merge pull request #33615 from raphael10241024/fix_shape_change

refresh area2d collision when shape changes
This commit is contained in:
Rémi Verschelde 2020-01-16 22:56:16 +01:00 committed by GitHub
commit 6fd4afa96b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,9 @@ AreaSW::BodyKey::BodyKey(AreaSW *p_body, uint32_t p_body_shape, uint32_t p_area_
}
void AreaSW::_shapes_changed() {
if (!moved_list.in_list() && get_space())
get_space()->area_add_to_moved_list(&moved_list);
}
void AreaSW::set_transform(const Transform &p_transform) {

View File

@ -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) {