Animation tuning to reduce foot sliding.

* Navigation walk speed has been reduced
* Tuned IdleToWalk timescale and interp time to reduce foot sliding
* Tuned fwd, back and lateral characteristicSpeeds to better match the
  animations.  This reduces foot sliding when moving forward and backward.
* Reduced rig state machine hysteresis to 1/60th of a second.
This commit is contained in:
Anthony J. Thibault 2016-09-26 09:59:50 -07:00
parent 10c5da5728
commit 203ff95849
3 changed files with 12 additions and 12 deletions

View file

@ -255,8 +255,8 @@
},
{
"id": "idleToWalkFwd",
"interpTarget": 3,
"interpDuration": 3,
"interpTarget": 5,
"interpDuration": 3.5,
"transitions": [
{ "var": "idleToWalkFwdOnDone", "state": "walkFwd" },
{ "var": "isNotMoving", "state": "idle" },
@ -523,7 +523,7 @@
"data": {
"alpha": 0.0,
"desiredSpeed": 1.4,
"characteristicSpeeds": [0.5, 1.4, 4.5],
"characteristicSpeeds": [0.5, 1.3, 4.5],
"alphaVar": "moveForwardAlpha",
"desiredSpeedVar": "moveForwardSpeed"
},
@ -573,7 +573,7 @@
"url": "animations/idle_to_walk.fbx",
"startFrame": 1.0,
"endFrame": 13.0,
"timeScale": 1.0,
"timeScale": 0.9,
"loopFlag": false
},
"children": []
@ -584,7 +584,7 @@
"data": {
"alpha": 0.0,
"desiredSpeed": 1.4,
"characteristicSpeeds": [0.6, 1.45],
"characteristicSpeeds": [0.6, 1.05],
"alphaVar": "moveBackwardAlpha",
"desiredSpeedVar": "moveBackwardSpeed"
},
@ -646,7 +646,7 @@
"data": {
"alpha": 0.0,
"desiredSpeed": 1.4,
"characteristicSpeeds": [0.2, 0.65],
"characteristicSpeeds": [0.2, 0.5],
"alphaVar": "moveLateralAlpha",
"desiredSpeedVar": "moveLateralSpeed"
},
@ -683,7 +683,7 @@
"data": {
"alpha": 0.0,
"desiredSpeed": 1.4,
"characteristicSpeeds": [0.2, 0.65],
"characteristicSpeeds": [0.2, 0.5],
"alphaVar": "moveLateralAlpha",
"desiredSpeedVar": "moveLateralSpeed"
},

View file

@ -59,7 +59,7 @@ using namespace std;
const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f);
const float DEFAULT_REAL_WORLD_FIELD_OF_VIEW_DEGREES = 30.0f;
const float MAX_WALKING_SPEED = 2.6f; // human walking speed
const float MAX_WALKING_SPEED = 2.0f; // human walking speed
const float MAX_BOOST_SPEED = 0.5f * MAX_WALKING_SPEED; // action motor gets additive boost below this speed
const float MIN_AVATAR_SPEED = 0.05f;
const float MIN_AVATAR_SPEED_SQUARED = MIN_AVATAR_SPEED * MIN_AVATAR_SPEED; // speed is set to zero below this

View file

@ -501,9 +501,9 @@ bool Rig::getRelativeDefaultJointTranslation(int index, glm::vec3& translationOu
}
// animation reference speeds.
static const std::vector<float> FORWARD_SPEEDS = { 0.4f, 1.4f, 4.5f }; // m/s
static const std::vector<float> BACKWARD_SPEEDS = { 0.6f, 1.45f }; // m/s
static const std::vector<float> LATERAL_SPEEDS = { 0.2f, 0.65f }; // m/s
static const std::vector<float> FORWARD_SPEEDS = { 0.4f, 1.3f, 4.5f }; // m/s
static const std::vector<float> BACKWARD_SPEEDS = { 0.6f, 1.05f }; // m/s
static const std::vector<float> LATERAL_SPEEDS = { 0.2f, 0.5f }; // m/s
void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPosition, const glm::vec3& worldVelocity, const glm::quat& worldRotation, CharacterControllerState ccState) {
@ -598,7 +598,7 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
}
}
const float STATE_CHANGE_HYSTERESIS_TIMER = 0.1f;
const float STATE_CHANGE_HYSTERESIS_TIMER = 1.0f / 60.0f;
// Skip hystersis timer for jump transitions.
if (_desiredState == RigRole::Takeoff) {