From 640063334de0b3a034c64fe8a2a631be04a62dc4 Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Sun, 1 Apr 2018 11:27:18 +0200 Subject: [PATCH] physics area added monitorable check (cherry picked from commit fe768f4f003a1089d886eec585612c211346eb4c) --- modules/bullet/space_bullet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index 47bdfaba1ff..66326046d2b 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -660,7 +660,10 @@ void SpaceBullet::check_ghost_overlaps() { // For each overlapping for (i = ghostOverlaps.size() - 1; 0 <= i; --i) { - if (!(ghostOverlaps[i]->getUserIndex() == CollisionObjectBullet::TYPE_RIGID_BODY || ghostOverlaps[i]->getUserIndex() == CollisionObjectBullet::TYPE_AREA)) + if (ghostOverlaps[i]->getUserIndex() == CollisionObjectBullet::TYPE_AREA) { + if (!static_cast(ghostOverlaps[i]->getUserPointer())->is_monitorable()) + continue; + } else if (ghostOverlaps[i]->getUserIndex() != CollisionObjectBullet::TYPE_RIGID_BODY) continue; otherObject = static_cast(ghostOverlaps[i]->getUserPointer());