mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 09:06:16 +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);
|
||||
} else {
|
||||
_relativePoses[tipIndex].rot() = newRelativeRotation;
|
||||
// Add last known rotations to interpolate from
|
||||
if (_rotationOnlyIKRotations.find(tipIndex) == _rotationOnlyIKRotations.end()) {
|
||||
_rotationOnlyIKRotations.insert(std::pair<int, glm::quat>(tipIndex, newRelativeRotation));
|
||||
} else {
|
||||
_rotationOnlyIKRotations[tipIndex] = newRelativeRotation;
|
||||
}
|
||||
}
|
||||
// Add last known rotations to interpolate from
|
||||
if (_rotationOnlyIKRotations.find(tipIndex) == _rotationOnlyIKRotations.end()) {
|
||||
_rotationOnlyIKRotations.insert(std::pair<int, glm::quat>(tipIndex, _relativePoses[tipIndex].rot()));
|
||||
} else {
|
||||
_rotationOnlyIKRotations[tipIndex] = _relativePoses[tipIndex].rot();
|
||||
}
|
||||
absolutePoses[tipIndex].rot() = targetRotation;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue