Merge pull request #7141 from sethalves/fix-avatar-fade

Fix avatar fade
This commit is contained in:
Brad Hefta-Gaub 2016-02-20 10:26:07 -08:00
commit e6614fb9e5
2 changed files with 4 additions and 4 deletions

View file

@ -162,7 +162,7 @@ void AvatarManager::updateOtherAvatars(float deltaTime) {
void AvatarManager::simulateAvatarFades(float deltaTime) {
QVector<AvatarSharedPointer>::iterator fadingIterator = _avatarFades.begin();
const float SHRINK_RATE = 0.9f;
const float SHRINK_RATE = 0.15f;
const float MIN_FADE_SCALE = MIN_AVATAR_SCALE;
render::ScenePointer scene = qApp->getMain3DScene();

View file

@ -92,15 +92,15 @@ void Model::setScale(const glm::vec3& scale) {
_scaledToFit = false;
}
const float METERS_PER_MILLIMETER = 0.01f;
const float SCALE_CHANGE_EPSILON = 0.01f;
void Model::setScaleInternal(const glm::vec3& scale) {
if (glm::distance(_scale, scale) > METERS_PER_MILLIMETER) {
if (glm::distance(_scale, scale) > SCALE_CHANGE_EPSILON) {
_scale = scale;
if (_scale.x == 0.0f || _scale.y == 0.0f || _scale.z == 0.0f) {
assert(false);
}
initJointTransforms();
simulate(0.0f, true);
}
}