From d0fb6d69718e4a39d49feac41b28097a46f8b7ec Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Mon, 6 Jul 2020 12:00:53 +0100 Subject: [PATCH] Clear a Bullet Area's overlappingObjects vector when removing an area from a space. (cherry picked from commit a615d359e86de1739c5049d5552fb734e82fed09) --- modules/bullet/area_bullet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp index 3af38656725..4f332b7f505 100644 --- a/modules/bullet/area_bullet.cpp +++ b/modules/bullet/area_bullet.cpp @@ -181,6 +181,7 @@ void AreaBullet::reload_body() { void AreaBullet::set_space(SpaceBullet *p_space) { // Clear the old space if there is one if (space) { + overlappingObjects.clear(); isScratched = false; // Remove this object form the physics world