summaryrefslogtreecommitdiffstats
path: root/modules/bullet/area_bullet.cpp
diff options
context:
space:
mode:
authorCamille Mohr-Daurat <pouleyKetchoup@gmail.com>2021-11-18 12:22:02 -0700
committerGitHub <noreply@github.com>2021-11-18 12:22:02 -0700
commit0deccc550c6898f6719b05bd01d0676b15a7e3b2 (patch)
tree0c65c22b7003b3170c83ef652dabd5ab80de1781 /modules/bullet/area_bullet.cpp
parent756eab200b41f842a5480681f5c48905ffbb88b0 (diff)
parent41d85ed5a9f8161e3bbb098f4249031e7b1d12ad (diff)
downloadredot-engine-0deccc550c6898f6719b05bd01d0676b15a7e3b2.tar.gz
Merge pull request #42374 from madmiraal/fix-32776
Trigger RigidBodyBullet space override updates when Area properties change.
Diffstat (limited to 'modules/bullet/area_bullet.cpp')
-rw-r--r--modules/bullet/area_bullet.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp
index 8b45507198..0d4982baba 100644
--- a/modules/bullet/area_bullet.cpp
+++ b/modules/bullet/area_bullet.cpp
@@ -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 {