Fix for grow/shrink rates.

This commit is contained in:
Andrzej Kapolka 2013-10-09 11:58:27 -07:00
parent 5511c02449
commit 604d6399eb

View file

@ -397,9 +397,9 @@ void Avatar::simulate(float deltaTime, Transmitter* transmitter) {
_hoverOffDuration = 0.0f;
const float GROW_DELAY = 1.0f;
const float GROW_DURATION = 1.0f;
const float GROW_RATE = 0.25f;
if (_hoverOnDuration > GROW_DELAY) {
_head.setScale(glm::mix(_head.getScale(), maxScale, 0.1f));
_head.setScale(glm::mix(_head.getScale(), maxScale, GROW_RATE));
}
} else {
@ -407,9 +407,9 @@ void Avatar::simulate(float deltaTime, Transmitter* transmitter) {
_hoverOffDuration += deltaTime;
const float SHRINK_DELAY = 1.0f;
const float SHRINK_DURATION = 1.0f;
const float SHRINK_RATE = 0.25f;
if (_hoverOffDuration > SHRINK_DELAY) {
_head.setScale(glm::mix(_head.getScale(), 1.0f, 0.1f));
_head.setScale(glm::mix(_head.getScale(), 1.0f, SHRINK_RATE));
}
}