mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 13:30:33 +02:00
store rotations when interpolating
This commit is contained in:
parent
e3ec87a8f8
commit
73b3419c75
1 changed files with 6 additions and 6 deletions
|
@ -362,12 +362,12 @@ void AnimInverseKinematics::solve(const AnimContext& context, const std::vector<
|
||||||
_relativePoses[tipIndex].rot() = safeMix(_relativePoses[tipIndex].rot(), newRelativeRotation, alpha);
|
_relativePoses[tipIndex].rot() = safeMix(_relativePoses[tipIndex].rot(), newRelativeRotation, alpha);
|
||||||
} else {
|
} else {
|
||||||
_relativePoses[tipIndex].rot() = newRelativeRotation;
|
_relativePoses[tipIndex].rot() = newRelativeRotation;
|
||||||
// Add last known rotations to interpolate from
|
}
|
||||||
if (_rotationOnlyIKRotations.find(tipIndex) == _rotationOnlyIKRotations.end()) {
|
// Add last known rotations to interpolate from
|
||||||
_rotationOnlyIKRotations.insert(std::pair<int, glm::quat>(tipIndex, newRelativeRotation));
|
if (_rotationOnlyIKRotations.find(tipIndex) == _rotationOnlyIKRotations.end()) {
|
||||||
} else {
|
_rotationOnlyIKRotations.insert(std::pair<int, glm::quat>(tipIndex, _relativePoses[tipIndex].rot()));
|
||||||
_rotationOnlyIKRotations[tipIndex] = newRelativeRotation;
|
} else {
|
||||||
}
|
_rotationOnlyIKRotations[tipIndex] = _relativePoses[tipIndex].rot();
|
||||||
}
|
}
|
||||||
absolutePoses[tipIndex].rot() = targetRotation;
|
absolutePoses[tipIndex].rot() = targetRotation;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue