Merge pull request #25180 from AndreaCatania/arov
Fixed area overlaps if not move
This commit is contained in:
commit
a0730652fc
1 changed files with 5 additions and 4 deletions
|
@ -678,11 +678,14 @@ void SpaceBullet::check_ghost_overlaps() {
|
||||||
// For each overlapping
|
// For each overlapping
|
||||||
for (i = ghostOverlaps.size() - 1; 0 <= i; --i) {
|
for (i = ghostOverlaps.size() - 1; 0 <= i; --i) {
|
||||||
|
|
||||||
|
bool hasOverlap = false;
|
||||||
btCollisionObject *overlapped_bt_co = ghostOverlaps[i];
|
btCollisionObject *overlapped_bt_co = ghostOverlaps[i];
|
||||||
RigidCollisionObjectBullet *otherObject = static_cast<RigidCollisionObjectBullet *>(overlapped_bt_co->getUserPointer());
|
RigidCollisionObjectBullet *otherObject = static_cast<RigidCollisionObjectBullet *>(overlapped_bt_co->getUserPointer());
|
||||||
|
|
||||||
if (!area->is_transform_changed() && !otherObject->is_transform_changed())
|
if (!area->is_transform_changed() && !otherObject->is_transform_changed()) {
|
||||||
continue;
|
hasOverlap = true;
|
||||||
|
goto collision_found;
|
||||||
|
}
|
||||||
|
|
||||||
if (overlapped_bt_co->getUserIndex() == CollisionObjectBullet::TYPE_AREA) {
|
if (overlapped_bt_co->getUserIndex() == CollisionObjectBullet::TYPE_AREA) {
|
||||||
if (!static_cast<AreaBullet *>(overlapped_bt_co->getUserPointer())->is_monitorable())
|
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)
|
} else if (overlapped_bt_co->getUserIndex() != CollisionObjectBullet::TYPE_RIGID_BODY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool hasOverlap = false;
|
|
||||||
|
|
||||||
// For each area shape
|
// For each area shape
|
||||||
for (y = area->get_shape_count() - 1; 0 <= y; --y) {
|
for (y = area->get_shape_count() - 1; 0 <= y; --y) {
|
||||||
if (!area->get_bt_shape(y)->isConvex())
|
if (!area->get_bt_shape(y)->isConvex())
|
||||||
|
|
Loading…
Reference in a new issue