mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-14 11:20:03 +02:00
Disable the old-school Rig::inverseKinematics during reset.
This commit is contained in:
parent
426ccabba7
commit
266c69fc70
3 changed files with 4 additions and 1 deletions
|
@ -156,6 +156,7 @@ void MyAvatar::reset() {
|
|||
bool isRig = _rig->getEnableRig();
|
||||
bool isGraph = _rig->getEnableAnimGraph();
|
||||
qApp->setRawAvatarUpdateThreading(false);
|
||||
_rig->disableHands = true;
|
||||
setEnableRigAnimations(true);
|
||||
_skeletonModel.simulate(0.1f); // non-zero
|
||||
setEnableRigAnimations(false);
|
||||
|
@ -167,6 +168,7 @@ void MyAvatar::reset() {
|
|||
setEnableAnimGraph(true);
|
||||
Menu::getInstance()->setIsOptionChecked(MenuOption::EnableAnimGraph, true);
|
||||
}
|
||||
_rig->disableHands = false;
|
||||
qApp->setRawAvatarUpdateThreading();
|
||||
}
|
||||
|
||||
|
|
|
@ -738,7 +738,7 @@ void Rig::inverseKinematics(int endIndex, glm::vec3 targetPosition, const glm::q
|
|||
return;
|
||||
}
|
||||
|
||||
if (_enableAnimGraph && _animSkeleton) {
|
||||
if (disableHands || (_enableAnimGraph && _animSkeleton)) {
|
||||
// the hand data goes through a different path: Rig::updateFromHandParameters() --> early-exit
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -193,6 +193,7 @@ public:
|
|||
|
||||
AnimNode::ConstPointer getAnimNode() const { return _animNode; }
|
||||
AnimSkeleton::ConstPointer getAnimSkeleton() const { return _animSkeleton; }
|
||||
bool disableHands {false}; // should go away with rig animation (and Rig::inverseKinematics)
|
||||
|
||||
protected:
|
||||
|
||||
|
|
Loading…
Reference in a new issue