mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 18:57:03 +02:00
Got that backwards.
This commit is contained in:
parent
523498ee5b
commit
09bb51261a
1 changed files with 4 additions and 3 deletions
|
@ -925,12 +925,13 @@ bool Model::setJointPosition(int jointIndex, const glm::vec3& translation, const
|
||||||
glm::quat combinedDelta;
|
glm::quat combinedDelta;
|
||||||
float combinedWeight;
|
float combinedWeight;
|
||||||
if (useRotation) {
|
if (useRotation) {
|
||||||
combinedDelta = rotation * glm::inverse(endRotation);
|
|
||||||
combinedWeight = 1.0f;
|
|
||||||
} else {
|
|
||||||
combinedDelta = safeMix(rotation * glm::inverse(endRotation),
|
combinedDelta = safeMix(rotation * glm::inverse(endRotation),
|
||||||
rotationBetween(jointVector, relativePosition - jointPosition), 0.5f);
|
rotationBetween(jointVector, relativePosition - jointPosition), 0.5f);
|
||||||
combinedWeight = 2.0f;
|
combinedWeight = 2.0f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
combinedDelta = rotationBetween(jointVector, relativePosition - jointPosition);
|
||||||
|
combinedWeight = 1.0f;
|
||||||
}
|
}
|
||||||
if (alignment != glm::vec3() && j > 1) {
|
if (alignment != glm::vec3() && j > 1) {
|
||||||
jointVector = endPosition - jointPosition;
|
jointVector = endPosition - jointPosition;
|
||||||
|
|
Loading…
Reference in a new issue