History

Clear the brush, clear the cobwebs, and set the other orientations now that we're clear on what coordinate system we're in.

Howard Stearns committed 11 years ago

Commit 2ed69001 parent 476ca361 file · +5 −6Browse files

Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 1 file). Show all

Unified · Split

interface/src/avatar/SkeletonModel.cpp+5−6
@@ -137,15 +137,14 @@ void SkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) { · 136 unmodified lines
137137 // If the head is not positioned, updateEyeJoints won't get the math right
138138 glm::quat headOrientation;
139139 _rig->getJointRotation(geometry.headJointIndex, headOrientation);
140− glm::quat modelOrientation = getRotation();
141− glm::quat adjust = modelOrientation;
142− glm::quat headOrientationInAvatar = adjust * headOrientation;
143− glm::vec3 eulers = safeEulerAngles(headOrientationInAvatar);
140+ glm::vec3 eulers = safeEulerAngles(headOrientation);
144141 head->setBasePitch(glm::degrees(-eulers.x));
142+ head->setBaseYaw(glm::degrees(eulers.y));
143+ head->setBaseRoll(glm::degrees(-eulers.z));
145144 _rig->updateEyeJoints(geometry.leftEyeJointIndex, geometry.rightEyeJointIndex,
146− getTranslation(), modelOrientation,
145+ getTranslation(), getRotation(),
147146 head->getFinalOrientationInWorldFrame(), head->getCorrectedLookAtPosition());
148− }
147+ }
149148 }
150149
151150 // Called by Avatar::simulate after it has set the joint states (fullUpdate true if changed),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t