From 05318acc7f4472d6e8e40449586c596b3b82ddf6 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 8 Aug 2014 08:37:28 -0700 Subject: [PATCH] don't make shapes for joints with zero radius --- interface/src/avatar/SkeletonModel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/src/avatar/SkeletonModel.cpp b/interface/src/avatar/SkeletonModel.cpp index f759dc99a3..5e593526be 100644 --- a/interface/src/avatar/SkeletonModel.cpp +++ b/interface/src/avatar/SkeletonModel.cpp @@ -685,6 +685,9 @@ void SkeletonModel::buildShapes() { // this shape is forced to be a sphere type = Shape::SPHERE_SHAPE; } + if (radius < EPSILON) { + type = Shape::UNKNOWN_SHAPE; + } Shape* shape = NULL; int parentIndex = joint.parentIndex; if (type == Shape::SPHERE_SHAPE) { @@ -699,7 +702,9 @@ void SkeletonModel::buildShapes() { } if (parentIndex != -1) { // always disable collisions between joint and its parent - disableCollisions(i, parentIndex); + if (shape) { + disableCollisions(i, parentIndex); + } } else { // give the base joint a very large mass since it doesn't actually move // in the local-frame simulation (it defines the origin)