From 41d85ed5a9f8161e3bbb098f4249031e7b1d12ad Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sun, 27 Sep 2020 16:10:12 +0100 Subject: [PATCH] Trigger RigidBodyBullet space override updates when Area properties change. --- modules/bullet/area_bullet.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp index b35019bea3d..40570af21cf 100644 --- a/modules/bullet/area_bullet.cpp +++ b/modules/bullet/area_bullet.cpp @@ -82,8 +82,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(otherObj.object); + body->scratch_space_override_modificator(); + } + break; + } case OVERLAP_STATE_DIRTY: - case OVERLAP_STATE_INSIDE: break; } } @@ -240,6 +246,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 {