aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrea Catania2018-04-01 11:27:18 +0200
committerHein-Pieter van Braam2018-04-28 20:15:24 +0200
commit640063334de0b3a034c64fe8a2a631be04a62dc4 (patch)
treeaad695279581a76bad1a625bc23b69651a521f3e /modules
parentac9e87aae3e23442e1e162ffabca5c9a1851f1a2 (diff)
downloadgodot-640063334de0b3a034c64fe8a2a631be04a62dc4.tar.gz
godot-640063334de0b3a034c64fe8a2a631be04a62dc4.tar.zst
godot-640063334de0b3a034c64fe8a2a631be04a62dc4.zip
physics area added monitorable check
(cherry picked from commit fe768f4f003a1089d886eec585612c211346eb4c)
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/space_bullet.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 47bdfaba1..66326046d 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<AreaBullet *>(ghostOverlaps[i]->getUserPointer())->is_monitorable())
+ continue;
+ } else if (ghostOverlaps[i]->getUserIndex() != CollisionObjectBullet::TYPE_RIGID_BODY)
continue;
otherObject = static_cast<RigidCollisionObjectBullet *>(ghostOverlaps[i]->getUserPointer());