summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-21 10:39:41 +0100
committerGitHub <noreply@github.com>2019-01-21 10:39:41 +0100
commita0730652fc214439572f79427db0b8678637f1bb (patch)
tree5ff63d21e65dbf57ae28e379d1ad239b5b5a4d84 /modules
parentcef99771f34f6896d96a89a1160b02acb184d3c1 (diff)
parenta9214bcee7c0151c6db137fd2641cb18a5ecc068 (diff)
Merge pull request #25180 from AndreaCatania/arov
Fixed area overlaps if not move
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/space_bullet.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index ab841e4acf..6562b18b3c 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -678,11 +678,14 @@ void SpaceBullet::check_ghost_overlaps() {
// For each overlapping
for (i = ghostOverlaps.size() - 1; 0 <= i; --i) {
+ bool hasOverlap = false;
btCollisionObject *overlapped_bt_co = ghostOverlaps[i];
RigidCollisionObjectBullet *otherObject = static_cast<RigidCollisionObjectBullet *>(overlapped_bt_co->getUserPointer());
- if (!area->is_transform_changed() && !otherObject->is_transform_changed())
- continue;
+ if (!area->is_transform_changed() && !otherObject->is_transform_changed()) {
+ hasOverlap = true;
+ goto collision_found;
+ }
if (overlapped_bt_co->getUserIndex() == CollisionObjectBullet::TYPE_AREA) {
if (!static_cast<AreaBullet *>(overlapped_bt_co->getUserPointer())->is_monitorable())
@@ -690,8 +693,6 @@ void SpaceBullet::check_ghost_overlaps() {
} else if (overlapped_bt_co->getUserIndex() != CollisionObjectBullet::TYPE_RIGID_BODY)
continue;
- bool hasOverlap = false;
-
// For each area shape
for (y = area->get_shape_count() - 1; 0 <= y; --y) {
if (!area->get_bt_shape(y)->isConvex())