mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
dynamicallyAdjustLimits on the underPoses not the relaxed poses.
This commit is contained in:
parent
22e79504bb
commit
47e51493e8
1 changed files with 2 additions and 2 deletions
|
@ -426,13 +426,13 @@ const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars
|
||||||
_relativePoses[i].trans() = underPoses[i].trans();
|
_relativePoses[i].trans() = underPoses[i].trans();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_relativePoses.empty()) {
|
if (!underPoses.empty()) {
|
||||||
// Sometimes the underpose itself can violate the constraints. Rather than
|
// Sometimes the underpose itself can violate the constraints. Rather than
|
||||||
// clamp the animation we dynamically expand each constraint to accomodate it.
|
// clamp the animation we dynamically expand each constraint to accomodate it.
|
||||||
std::map<int, RotationConstraint*>::iterator constraintItr = _constraints.begin();
|
std::map<int, RotationConstraint*>::iterator constraintItr = _constraints.begin();
|
||||||
while (constraintItr != _constraints.end()) {
|
while (constraintItr != _constraints.end()) {
|
||||||
int index = constraintItr->first;
|
int index = constraintItr->first;
|
||||||
constraintItr->second->dynamicallyAdjustLimits(_relativePoses[index].rot());
|
constraintItr->second->dynamicallyAdjustLimits(underPoses[index].rot());
|
||||||
++constraintItr;
|
++constraintItr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue