mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 19:03:07 +02:00
don't create shape for SHAPE_TYPE_NONE
This commit is contained in:
parent
3239c259f9
commit
f4a4c9786c
1 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,9 @@ ShapeManager::~ShapeManager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
btCollisionShape* ShapeManager::getShape(const ShapeInfo& info) {
|
btCollisionShape* ShapeManager::getShape(const ShapeInfo& info) {
|
||||||
|
if (info.getType() == SHAPE_TYPE_NONE) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
// Very small or large objects are not supported.
|
// Very small or large objects are not supported.
|
||||||
float diagonal = 4.0f * glm::length2(info.getHalfExtents());
|
float diagonal = 4.0f * glm::length2(info.getHalfExtents());
|
||||||
const float MIN_SHAPE_DIAGONAL_SQUARED = 3.0e-4f; // 1 cm cube
|
const float MIN_SHAPE_DIAGONAL_SQUARED = 3.0e-4f; // 1 cm cube
|
||||||
|
|
Loading…
Reference in a new issue