refresh area2d collision when shape changes, close #33369

This commit is contained in:
RaphaelHunter 2019-11-14 15:48:41 +08:00
parent 14e52f7aee
commit 8330e70e2c
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) {