Merge pull request #54111 from nekomatata/fix-rigid-body-update-collision-layer-3.x

This commit is contained in:
Rémi Verschelde 2021-11-08 23:58:47 +01:00 committed by GitHub
commit 6b7c841e1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -287,6 +287,8 @@ PhysicsServer::BodyMode BodySW::get_mode() const {
void BodySW::_shapes_changed() {
_update_inertia();
wakeup();
wakeup_neighbours();
}
void BodySW::set_state(PhysicsServer::BodyState p_state, const Variant &p_variant) {

View file

@ -578,7 +578,6 @@ void PhysicsServerSW::body_set_collision_layer(RID p_body, uint32_t p_layer) {
ERR_FAIL_COND(!body);
body->set_collision_layer(p_layer);
body->wakeup();
}
uint32_t PhysicsServerSW::body_get_collision_layer(RID p_body) const {
@ -593,7 +592,6 @@ void PhysicsServerSW::body_set_collision_mask(RID p_body, uint32_t p_mask) {
ERR_FAIL_COND(!body);
body->set_collision_mask(p_mask);
body->wakeup();
}
uint32_t PhysicsServerSW::body_get_collision_mask(RID p_body) const {

View file

@ -251,6 +251,7 @@ Physics2DServer::BodyMode Body2DSW::get_mode() const {
void Body2DSW::_shapes_changed() {
_update_inertia();
wakeup();
wakeup_neighbours();
}