Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 2 files). Show all
Unified · Split
| @@ -547,14 +547,11 @@ void SkeletonModel::computeBoundingShape() { · 546 unmodified lines | |||
| 547 | // compute the default transform of this joint | 547 | // compute the default transform of this joint |
| 548 | const JointState& state = _rig->getJointState(i); | 548 | const JointState& state = _rig->getJointState(i); |
| 549 | 549 | ||
| 550 | // HACK WORKAROUND: ignore joints that may have bad translation (e.g. have been flagged as such with zero radius) | 550 | // Each joint contributes a sphere at its position |
| 551 | if (state.getBoneRadius() > 0.0f) { | 551 | glm::vec3 axis(state.getBoneRadius()); |
| 552 | // Each joint contributes a sphere at its position | 552 | glm::vec3 jointPosition = state.getPosition(); |
| 553 | glm::vec3 axis(state.getBoneRadius()); | 553 | totalExtents.addPoint(jointPosition + axis); |
| 554 | glm::vec3 jointPosition = state.getPosition(); | 554 | totalExtents.addPoint(jointPosition - axis); |
| 555 | totalExtents.addPoint(jointPosition + axis); | ||
| 556 | totalExtents.addPoint(jointPosition - axis); | ||
| 557 | } | ||
| 558 | } | 555 | } |
| 559 | 556 | ||
| 560 | // compute bounding shape parameters | 557 | // compute bounding shape parameters |