diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-09-24 15:11:06 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-10-08 14:51:57 +0100 |
commit | 0d3e8538ef4703955499fc0f8d532a99c92cb689 (patch) | |
tree | 2aa1e692c588b9734690341f88e9bbd884114579 /modules/bullet/area_bullet.cpp | |
parent | 53a3dfbf6b78cc3d0662abec4efa4bbeae4939f6 (diff) |
Update Bullet Area overlaps when Area properties or shapes change.
Diffstat (limited to 'modules/bullet/area_bullet.cpp')
-rw-r--r-- | modules/bullet/area_bullet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp index f8f7d79a11..7bf1a1b2b6 100644 --- a/modules/bullet/area_bullet.cpp +++ b/modules/bullet/area_bullet.cpp @@ -153,6 +153,7 @@ int AreaBullet::find_overlapping_object(CollisionObjectBullet *p_colObj) { void AreaBullet::set_monitorable(bool p_monitorable) { monitorable = p_monitorable; + updated = true; } bool AreaBullet::is_monitoring() const { @@ -162,6 +163,7 @@ bool AreaBullet::is_monitoring() const { void AreaBullet::main_shape_changed() { CRASH_COND(!get_main_shape()); btGhost->setCollisionShape(get_main_shape()); + updated = true; } void AreaBullet::reload_body() { @@ -192,6 +194,7 @@ void AreaBullet::on_collision_filters_change() { if (space) { space->reload_collision_filters(this); } + updated = true; } void AreaBullet::add_overlap(CollisionObjectBullet *p_otherObject) { @@ -277,6 +280,7 @@ void AreaBullet::set_event_callback(Type p_callbackObjectType, ObjectID p_id, co set_godot_object_flags(get_godot_object_flags() | GOF_IS_MONITORING_AREA); } else { set_godot_object_flags(get_godot_object_flags() & (~GOF_IS_MONITORING_AREA)); + clear_overlaps(true); } } |