make formula more readable

This commit is contained in:
Philip Rosedale 2014-12-30 20:34:12 -08:00
parent dc9937e11a
commit 104f7b7576

View file

@ -90,10 +90,11 @@ void Head::simulate(float deltaTime, bool isMine, bool billboard) {
}
}
// Twist the upper body to follow the rotation of the head, but only do this with my avatar,
// since everyone else will see the full joint rotations for other people.
// since everyone else will see the full joint rotations for other people.
const float BODY_FOLLOW_HEAD_YAW_RATE = 0.1f;
const float BODY_FOLLOW_HEAD_FACTOR = 1.5f;
setTorsoTwist((1.0f - BODY_FOLLOW_HEAD_YAW_RATE) * getTorsoTwist() + getFinalYaw() * BODY_FOLLOW_HEAD_YAW_RATE / BODY_FOLLOW_HEAD_FACTOR);
const float BODY_FOLLOW_HEAD_FACTOR = 0.66f;
float currentTwist = getTorsoTwist();
setTorsoTwist(currentTwist + (getFinalYaw() * BODY_FOLLOW_HEAD_FACTOR - currentTwist) * BODY_FOLLOW_HEAD_YAW_RATE);
}
// Update audio trailing average for rendering facial animations