mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Account for collisionGroup in CollisionRegion implementation
This commit is contained in:
parent
9a86b7451b
commit
3b7dac9058
1 changed files with 7 additions and 1 deletions
|
@ -349,12 +349,14 @@ public:
|
|||
return !std::isnan(threshold) &&
|
||||
!(glm::any(glm::isnan(transform.getTranslation())) ||
|
||||
glm::any(glm::isnan(transform.getRotation())) ||
|
||||
shapeInfo->getType() == SHAPE_TYPE_NONE);
|
||||
shapeInfo->getType() == SHAPE_TYPE_NONE ||
|
||||
collisionGroup == 0);
|
||||
}
|
||||
|
||||
bool operator==(const CollisionRegion& other) const {
|
||||
return loaded == other.loaded &&
|
||||
threshold == other.threshold &&
|
||||
collisionGroup == other.collisionGroup &&
|
||||
glm::all(glm::equal(transform.getTranslation(), other.transform.getTranslation())) &&
|
||||
glm::all(glm::equal(transform.getRotation(), other.transform.getRotation())) &&
|
||||
glm::all(glm::equal(transform.getScale(), other.transform.getScale())) &&
|
||||
|
@ -370,6 +372,10 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
if (collisionGroup == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !shapeInfo->getPointCollection().size();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue