fix for avatars created with blender

This commit is contained in:
U-GAPOS\andrew 2015-11-09 14:11:45 -08:00
parent 2716a9f2b4
commit c07b97920e

View file

@ -173,7 +173,7 @@ void AnimInverseKinematics::solveWithCyclicCoordinateDescent(const std::vector<I
glm::quat tipParentRotation = absolutePoses[pivotIndex].rot;
// descend toward root, pivoting each joint to get tip closer to target
while (pivotsParentIndex != -1) {
while (pivotsParentIndex != -1 && pivotIndex != _hipsIndex) {
// compute the two lines that should be aligned
glm::vec3 jointPosition = absolutePoses[pivotIndex].trans;
glm::vec3 leverArm = tipPosition - jointPosition;