summaryrefslogtreecommitdiff
path: root/modules/bullet/area_bullet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bullet/area_bullet.cpp')
-rw-r--r--modules/bullet/area_bullet.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp
index 3668088590..f1da454e2e 100644
--- a/modules/bullet/area_bullet.cpp
+++ b/modules/bullet/area_bullet.cpp
@@ -57,7 +57,6 @@ AreaBullet::AreaBullet() :
spOv_priority(0) {
btGhost = bulletnew(btGhostObject);
- btGhost->setCollisionShape(compoundShape);
setupBulletCollisionObject(btGhost);
/// Collision objects with a callback still have collision response with dynamic rigid bodies.
/// In order to use collision objects as trigger, you have to disable the collision response.
@@ -162,6 +161,10 @@ bool AreaBullet::is_monitoring() const {
return get_godot_object_flags() & GOF_IS_MONITORING_AREA;
}
+void AreaBullet::main_shape_resetted() {
+ btGhost->setCollisionShape(get_main_shape());
+}
+
void AreaBullet::reload_body() {
if (space) {
space->remove_area(this);