History

rolling back previous change for IK instability

Andrew Meadows committed 12 years ago

Commit f99489c1 parent d7be5fa3 files · +16 −15Browse files

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

Unified · Split

interface/src/avatar/SkeletonModel.cpp+5−5
@@ -147,7 +147,7 @@ void SkeletonModel::applyHandPosition(int jointIndex, const glm::vec3& position) · 146 unmodified lines
147147 return;
148148 }
149149 JointState& state = _jointStates[jointIndex];
150− glm::quat handRotation = state.getRotationFromBindToModelFrame();
150+ glm::quat handRotation = state.getJointRotation();
151151
152152 // align hand with forearm
153153 float sign = (jointIndex == geometry.rightHandJointIndex) ? 1.0f : -1.0f;
@@ -170,10 +170,10 @@ void SkeletonModel::applyPalmData(int jointIndex, PalmData& palm) { · 16 unmodified lines
170170 if (!Menu::getInstance()->isOptionChecked(MenuOption::AlternateIK) &&
171171 Menu::getInstance()->isOptionChecked(MenuOption::AlignForearmsWithWrists)) {
172172 JointState parentState = _jointStates[parentJointIndex];
173− palmRotation = parentState.getRotationFromBindToModelFrame();
173+ palmRotation = parentState.getJointRotation();
174174 } else {
175175 JointState state = _jointStates[jointIndex];
176− palmRotation = state.getRotationFromBindToModelFrame();
176+ palmRotation = state.getJointRotation();
177177 }
178178 palmRotation = rotationBetween(palmRotation * geometry.palmDirection, palm.getNormal()) * palmRotation;
179179
@@ -414,7 +414,7 @@ bool SkeletonModel::getNeckParentRotation(glm::quat& neckParentRotation) const { · 234 unmodified lines
414414 if (geometry.neckJointIndex == -1) {
415415 return false;
416416 }
417− return getJointRotationFromBindToWorldFrame(geometry.joints.at(geometry.neckJointIndex).parentIndex, neckParentRotation);
417+ return getJointRotationInWorldFrame(geometry.joints.at(geometry.neckJointIndex).parentIndex, neckParentRotation);
418418 }
419419
420420 bool SkeletonModel::getEyePositions(glm::vec3& firstEyePosition, glm::vec3& secondEyePosition) const {
@@ -433,7 +433,7 @@ bool SkeletonModel::getEyePositions(glm::vec3& firstEyePosition, glm::vec3& seco · 12 unmodified lines
433433 const float EYE_PROPORTION = 0.6f;
434434 glm::vec3 baseEyePosition = glm::mix(neckPosition, headPosition, EYE_PROPORTION);
435435 glm::quat headRotation;
436− getJointRotationFromBindToWorldFrame(geometry.headJointIndex, headRotation);
436+ getJointRotationInWorldFrame(geometry.headJointIndex, headRotation);
437437 const float EYES_FORWARD = 0.25f;
438438 const float EYE_SEPARATION = 0.1f;
439439 float headHeight = glm::distance(neckPosition, headPosition);

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