mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 20:54:25 +02:00
made the ik enable/disable work for the old animIK node json
This commit is contained in:
parent
a04e6d55ff
commit
78d6e42fc8
1 changed files with 7 additions and 0 deletions
|
@ -1069,6 +1069,10 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
|
|||
t += deltaTime;
|
||||
|
||||
if (_enableInverseKinematics) {
|
||||
|
||||
// animIK node json
|
||||
_animVars.set("ikOverlayAlpha", 1.0f);
|
||||
// animSpline json
|
||||
_animVars.set("splineIKEnabled", true);
|
||||
_animVars.set("leftHandIKEnabled", true);
|
||||
_animVars.set("rightHandIKEnabled", true);
|
||||
|
@ -1079,6 +1083,9 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
|
|||
_animVars.set("leftFootPoleVectorEnabled", true);
|
||||
_animVars.set("rightFootPoleVectorEnabled", true);
|
||||
} else {
|
||||
// animIK node json
|
||||
_animVars.set("ikOverlayAlpha", 0.0f);
|
||||
// animSpline json
|
||||
_animVars.set("splineIKEnabled", false);
|
||||
_animVars.set("leftHandIKEnabled", false);
|
||||
_animVars.set("rightHandIKEnabled", false);
|
||||
|
|
Loading…
Reference in a new issue