3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 13:15:28 +02:00

don't create shape for SHAPE_TYPE_NONE

This commit is contained in:
Andrew Meadows 2015-02-11 08:43:55 -08:00
parent 3239c259f9
commit f4a4c9786c

View file

@ -27,6 +27,9 @@ ShapeManager::~ShapeManager() {
}
btCollisionShape* ShapeManager::getShape(const ShapeInfo& info) {
if (info.getType() == SHAPE_TYPE_NONE) {
return NULL;
}
// Very small or large objects are not supported.
float diagonal = 4.0f * glm::length2(info.getHalfExtents());
const float MIN_SHAPE_DIAGONAL_SQUARED = 3.0e-4f; // 1 cm cube