Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 4 files). Show all
Unified · Split
| @@ -200,7 +200,7 @@ void SkeletonModel::applyPalmDataInModelFrame(int jointIndex, PalmData& palm) { · 199 unmodified lines | ||
| 200 | 200 | JointState& parentState = _jointStates[parentJointIndex]; |
| 201 | 201 | parentState.setRotationInModelFrame(palmRotation, PALM_PRIORITY); |
| 202 | 202 | // lock hand to forearm by slamming its rotation (in parent-frame) to identity |
| 203 | − _jointStates[jointIndex]._rotation = glm::quat(); | |
| 203 | + _jointStates[jointIndex]._rotationInParentFrame = glm::quat(); | |
| 204 | 204 | } else { |
| 205 | 205 | setJointPositionInModelFrame(jointIndex, palmPosition, palmRotation, |
| 206 | 206 | true, -1, false, glm::vec3(0.0f, -1.0f, 0.0f), PALM_PRIORITY); |
| @@ -239,7 +239,7 @@ void SkeletonModel::maybeUpdateLeanRotation(const JointState& parentState, const · 32 unmodified lines | ||
| 239 | 239 | glm::mat3 axes = glm::mat3_cast(glm::quat()); |
| 240 | 240 | glm::mat3 inverse = glm::mat3(glm::inverse(parentState.getTransformInModelFrame() * glm::translate(state.getDefaultTranslationInParentFrame()) * |
| 241 | 241 | joint.preTransform * glm::mat4_cast(joint.preRotation * joint.rotation))); |
| 242 | − state._rotation = glm::angleAxis(- RADIANS_PER_DEGREE * _owningAvatar->getHead()->getFinalLeanSideways(), | |
| 242 | + state._rotationInParentFrame = glm::angleAxis(- RADIANS_PER_DEGREE * _owningAvatar->getHead()->getFinalLeanSideways(), | |
| 243 | 243 | glm::normalize(inverse * axes[2])) * glm::angleAxis(- RADIANS_PER_DEGREE * _owningAvatar->getHead()->getFinalLeanForward(), |
| 244 | 244 | glm::normalize(inverse * axes[0])) * joint.rotation; |
| 245 | 245 | } |