mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
make formula more readable
This commit is contained in:
parent
dc9937e11a
commit
104f7b7576
1 changed files with 4 additions and 3 deletions
|
@ -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,
|
// 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_YAW_RATE = 0.1f;
|
||||||
const float BODY_FOLLOW_HEAD_FACTOR = 1.5f;
|
const float BODY_FOLLOW_HEAD_FACTOR = 0.66f;
|
||||||
setTorsoTwist((1.0f - BODY_FOLLOW_HEAD_YAW_RATE) * getTorsoTwist() + getFinalYaw() * BODY_FOLLOW_HEAD_YAW_RATE / BODY_FOLLOW_HEAD_FACTOR);
|
float currentTwist = getTorsoTwist();
|
||||||
|
setTorsoTwist(currentTwist + (getFinalYaw() * BODY_FOLLOW_HEAD_FACTOR - currentTwist) * BODY_FOLLOW_HEAD_YAW_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update audio trailing average for rendering facial animations
|
// Update audio trailing average for rendering facial animations
|
||||||
|
|
Loading…
Reference in a new issue