mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:27:04 +02:00
added final animations and json to the resource
This commit is contained in:
parent
27ed468946
commit
395a4cc9c4
4 changed files with 11 additions and 11 deletions
Binary file not shown.
Binary file not shown.
|
@ -990,7 +990,7 @@
|
||||||
"data": {
|
"data": {
|
||||||
"currentState": "masterIdle",
|
"currentState": "masterIdle",
|
||||||
"triggerTimeMin": 10.0,
|
"triggerTimeMin": 10.0,
|
||||||
"triggerTimeMax": 40.0,
|
"triggerTimeMax": 60.0,
|
||||||
"transitionVar": "timeToFidget",
|
"transitionVar": "timeToFidget",
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
|
@ -1032,7 +1032,7 @@
|
||||||
"currentState": "masterIdle1",
|
"currentState": "masterIdle1",
|
||||||
"triggerRandomSwitch": "masterIdleSwitch",
|
"triggerRandomSwitch": "masterIdleSwitch",
|
||||||
"randomSwitchTimeMin": 10.0,
|
"randomSwitchTimeMin": 10.0,
|
||||||
"randomSwitchTimeMax": 40.0,
|
"randomSwitchTimeMax": 60.0,
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
"id": "masterIdle1",
|
"id": "masterIdle1",
|
||||||
|
@ -1079,7 +1079,7 @@
|
||||||
"data": {
|
"data": {
|
||||||
"url": "qrc:///avatar/animations/idleWS_all.fbx",
|
"url": "qrc:///avatar/animations/idleWS_all.fbx",
|
||||||
"startFrame": 1.0,
|
"startFrame": 1.0,
|
||||||
"endFrame": 1313.0,
|
"endFrame": 1620.0,
|
||||||
"timeScale": 1.0,
|
"timeScale": 1.0,
|
||||||
"loopFlag": true
|
"loopFlag": true
|
||||||
},
|
},
|
||||||
|
@ -1237,9 +1237,9 @@
|
||||||
"id": "movement4",
|
"id": "movement4",
|
||||||
"type": "clip",
|
"type": "clip",
|
||||||
"data": {
|
"data": {
|
||||||
"url": "qrc:///avatar/animations/idleWS.fbx",
|
"url": "qrc:///avatar/animations/idleWS_all.fbx",
|
||||||
"startFrame": 1,
|
"startFrame": 1,
|
||||||
"endFrame": 1314,
|
"endFrame": 1620,
|
||||||
"timeScale": 1.0,
|
"timeScale": 1.0,
|
||||||
"loopFlag": false
|
"loopFlag": false
|
||||||
},
|
},
|
||||||
|
@ -1273,9 +1273,9 @@
|
||||||
"id": "movement7",
|
"id": "movement7",
|
||||||
"type": "clip",
|
"type": "clip",
|
||||||
"data": {
|
"data": {
|
||||||
"url": "qrc:///avatar/animations/idleWS.fbx",
|
"url": "qrc:///avatar/animations/idleWS_all.fbx",
|
||||||
"startFrame": 1,
|
"startFrame": 1,
|
||||||
"endFrame": 1314,
|
"endFrame": 1620,
|
||||||
"timeScale": 1.0,
|
"timeScale": 1.0,
|
||||||
"loopFlag": false
|
"loopFlag": false
|
||||||
},
|
},
|
||||||
|
@ -1301,7 +1301,7 @@
|
||||||
"data": {
|
"data": {
|
||||||
"currentState": "transitionToAltIdle1",
|
"currentState": "transitionToAltIdle1",
|
||||||
"triggerTimeMin": 10.0,
|
"triggerTimeMin": 10.0,
|
||||||
"triggerTimeMax": 40.0,
|
"triggerTimeMax": 60.0,
|
||||||
"transitionVar": "finishAltIdle2",
|
"transitionVar": "finishAltIdle2",
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,6 +26,7 @@ const AnimPoseVec& AnimRandomSwitch::evaluate(const AnimVariantMap& animVars, co
|
||||||
|
|
||||||
AnimRandomSwitch::RandomSwitchState::Pointer desiredState = _currentState;
|
AnimRandomSwitch::RandomSwitchState::Pointer desiredState = _currentState;
|
||||||
if (abs(_randomSwitchEvaluationCount - context.getEvaluationCount()) > 1 || animVars.lookup(_triggerRandomSwitchVar, false)) {
|
if (abs(_randomSwitchEvaluationCount - context.getEvaluationCount()) > 1 || animVars.lookup(_triggerRandomSwitchVar, false)) {
|
||||||
|
|
||||||
// get a random number and decide which motion to choose.
|
// get a random number and decide which motion to choose.
|
||||||
bool currentStateHasPriority = false;
|
bool currentStateHasPriority = false;
|
||||||
float dice = randFloatInRange(0.0f, 1.0f);
|
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);
|
float upperBound = lowerBound + (randState->getPriority() / _totalPriorities);
|
||||||
if ((dice > lowerBound) && (dice < upperBound)) {
|
if ((dice > lowerBound) && (dice < upperBound)) {
|
||||||
desiredState = randState;
|
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.
|
// 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);
|
currentStateHasPriority = currentStateHasPriority || (_currentState == randState);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue