Merge pull request #42374 from madmiraal/fix-32776

Trigger RigidBodyBullet space override updates when Area properties change.
This commit is contained in:
Camille Mohr-Daurat 2021-11-18 12:22:02 -07:00 committed by GitHub
commit 0deccc550c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,8 +85,14 @@ void AreaBullet::dispatch_callbacks() {
otherObj.object->on_exit_area(this);
overlappingObjects.remove(i); // Remove after callback
break;
case OVERLAP_STATE_INSIDE: {
if (otherObj.object->getType() == TYPE_RIGID_BODY) {
RigidBodyBullet *body = static_cast<RigidBodyBullet *>(otherObj.object);
body->scratch_space_override_modificator();
}
break;
}
case OVERLAP_STATE_DIRTY:
case OVERLAP_STATE_INSIDE:
break;
}
}
@ -244,6 +250,7 @@ void AreaBullet::set_param(PhysicsServer3D::AreaParameter p_param, const Variant
default:
WARN_PRINT("Area doesn't support this parameter in the Bullet backend: " + itos(p_param));
}
scratch();
}
Variant AreaBullet::get_param(PhysicsServer3D::AreaParameter p_param) const {