diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-04-03 22:09:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-03 22:09:56 +0200 |
commit | a7dd698d4d0c46c777c87681d9d20c1a3bb7101e (patch) | |
tree | 2a0046f3afc4033ed5c21ad85f67c858416cb942 /modules | |
parent | 7b1c66126902fec9ec37c4bf1b6c3e371440067a (diff) | |
parent | fe768f4f003a1089d886eec585612c211346eb4c (diff) |
Merge pull request #17900 from AndreaCatania/area_mon
physics area added monitorable check
Diffstat (limited to 'modules')
-rw-r--r-- | modules/bullet/space_bullet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index 8c15758e0f..ab711fa6b9 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()); |