diff --git a/libraries/physics/src/MultiSphereShape.cpp b/libraries/physics/src/MultiSphereShape.cpp index 1d2525741c..ce00a7c40f 100644 --- a/libraries/physics/src/MultiSphereShape.cpp +++ b/libraries/physics/src/MultiSphereShape.cpp @@ -487,9 +487,6 @@ void MultiSphereShape::calculateDebugLines() { } } } - if (radiuses.size() == 0) { - radiuses.push_back(0.0f); - } calculateChamferBox(_debugLines, radiuses, axes, _midPoint); } else if (_spheres.size() == 8) { std::vector axes; @@ -512,6 +509,11 @@ void MultiSphereShape::connectEdges(std::vector> void MultiSphereShape::calculateChamferBox(std::vector>& outLines, const std::vector& radiuses, const std::vector& axes, const glm::vec3& translation) { std::vector> sphereLines; + + if (radiuses.size() == 0) { + return; + } + calculateSphereLines(sphereLines, glm::vec3(0.0f), radiuses[0]); std::vector regions = {