Merge branch 'stt_collision-group' of https://github.com/sabrina-shanman/hifi into stt_teleport_wip

This commit is contained in:
luiscuenca 2018-09-10 15:18:15 -07:00
commit 9c6ee18db5

View file

@ -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();
}