Skip to content

Commit

Permalink
Trigger RigidBodyBullet space override updates when Area properties c…
Browse files Browse the repository at this point in the history
…hange.
  • Loading branch information
madmiraal committed Sep 27, 2020
1 parent 545da82 commit 41d85ed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/bullet/area_bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<RigidBodyBullet *>(otherObj.object);
body->scratch_space_override_modificator();
}
break;
}
case OVERLAP_STATE_DIRTY:
case OVERLAP_STATE_INSIDE:
break;
}
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 41d85ed

Please sign in to comment.