diff --git a/interface/resources/avatar/animations/idleWS_all.fbx b/interface/resources/avatar/animations/idleWS_all.fbx index 7b8348f4a1..f9ac3dacfb 100644 Binary files a/interface/resources/avatar/animations/idleWS_all.fbx and b/interface/resources/avatar/animations/idleWS_all.fbx differ diff --git a/interface/resources/avatar/animations/talk04.fbx b/interface/resources/avatar/animations/talk04.fbx index 809fff21db..be2ba0a11f 100644 Binary files a/interface/resources/avatar/animations/talk04.fbx and b/interface/resources/avatar/animations/talk04.fbx differ diff --git a/interface/resources/avatar/avatar-animation.json b/interface/resources/avatar/avatar-animation.json index a91ae81e54..738975bb8c 100644 --- a/interface/resources/avatar/avatar-animation.json +++ b/interface/resources/avatar/avatar-animation.json @@ -990,7 +990,7 @@ "data": { "currentState": "masterIdle", "triggerTimeMin": 10.0, - "triggerTimeMax": 40.0, + "triggerTimeMax": 60.0, "transitionVar": "timeToFidget", "states": [ { @@ -1032,7 +1032,7 @@ "currentState": "masterIdle1", "triggerRandomSwitch": "masterIdleSwitch", "randomSwitchTimeMin": 10.0, - "randomSwitchTimeMax": 40.0, + "randomSwitchTimeMax": 60.0, "states": [ { "id": "masterIdle1", @@ -1079,7 +1079,7 @@ "data": { "url": "qrc:///avatar/animations/idleWS_all.fbx", "startFrame": 1.0, - "endFrame": 1313.0, + "endFrame": 1620.0, "timeScale": 1.0, "loopFlag": true }, @@ -1237,9 +1237,9 @@ "id": "movement4", "type": "clip", "data": { - "url": "qrc:///avatar/animations/idleWS.fbx", + "url": "qrc:///avatar/animations/idleWS_all.fbx", "startFrame": 1, - "endFrame": 1314, + "endFrame": 1620, "timeScale": 1.0, "loopFlag": false }, @@ -1273,9 +1273,9 @@ "id": "movement7", "type": "clip", "data": { - "url": "qrc:///avatar/animations/idleWS.fbx", + "url": "qrc:///avatar/animations/idleWS_all.fbx", "startFrame": 1, - "endFrame": 1314, + "endFrame": 1620, "timeScale": 1.0, "loopFlag": false }, @@ -1301,7 +1301,7 @@ "data": { "currentState": "transitionToAltIdle1", "triggerTimeMin": 10.0, - "triggerTimeMax": 40.0, + "triggerTimeMax": 60.0, "transitionVar": "finishAltIdle2", "states": [ { diff --git a/libraries/animation/src/AnimRandomSwitch.cpp b/libraries/animation/src/AnimRandomSwitch.cpp index d1fe4d941a..2549a50062 100644 --- a/libraries/animation/src/AnimRandomSwitch.cpp +++ b/libraries/animation/src/AnimRandomSwitch.cpp @@ -26,6 +26,7 @@ const AnimPoseVec& AnimRandomSwitch::evaluate(const AnimVariantMap& animVars, co AnimRandomSwitch::RandomSwitchState::Pointer desiredState = _currentState; if (abs(_randomSwitchEvaluationCount - context.getEvaluationCount()) > 1 || animVars.lookup(_triggerRandomSwitchVar, false)) { + // get a random number and decide which motion to choose. bool currentStateHasPriority = false; float dice = randFloatInRange(0.0f, 1.0f); @@ -35,10 +36,9 @@ const AnimPoseVec& AnimRandomSwitch::evaluate(const AnimVariantMap& animVars, co float upperBound = lowerBound + (randState->getPriority() / _totalPriorities); if ((dice > lowerBound) && (dice < upperBound)) { desiredState = randState; - break; - } else { - lowerBound = upperBound; } + lowerBound = upperBound; + // this indicates if the curent state is one that can be selected randomly, or is one that was transitioned to by the random duration timer. currentStateHasPriority = currentStateHasPriority || (_currentState == randState); }