fix bug -- negate logic around invalid joint index

This commit is contained in:
Andrew Meadows 2014-05-27 15:53:20 -07:00
parent ae3b792a35
commit 9f72d6ca3f

View file

@ -201,7 +201,7 @@ void SkeletonModel::updateJointState(int index) {
JointState& state = _jointStates[index];
const FBXGeometry& geometry = _geometry->getFBXGeometry();
const FBXJoint& joint = geometry.joints.at(index);
if (joint.parentIndex == -1) {
if (joint.parentIndex != -1) {
const JointState& parentState = _jointStates.at(joint.parentIndex);
if (index == geometry.leanJointIndex) {
maybeUpdateLeanRotation(parentState, joint, state);