From ae4db63368d9cddd0765c8dea0588598c1b21816 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 5 Nov 2013 16:11:12 -0800 Subject: [PATCH] Remove growing head behavior. --- interface/src/avatar/Avatar.cpp | 26 -------------------------- interface/src/avatar/Avatar.h | 2 -- 2 files changed, 28 deletions(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 1fc2157e09..31e1ee43fb 100755 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -96,8 +96,6 @@ Avatar::Avatar(Node* owningNode) : _leadingAvatar(NULL), _voxels(this), _moving(false), - _hoverOnDuration(0.0f), - _hoverOffDuration(0.0f), _initialized(false), _handHoldingPosition(0.0f, 0.0f, 0.0f), _maxArmLength(0.0f), @@ -387,30 +385,6 @@ void Avatar::simulate(float deltaTime, Transmitter* transmitter) { } } - // head scale grows when avatar is looked at - const float BASE_MAX_SCALE = 3.0f; - float maxScale = BASE_MAX_SCALE * glm::distance(_position, Application::getInstance()->getCamera()->getPosition()); - if (Application::getInstance()->getLookatTargetAvatar() == this) { - _hoverOnDuration += deltaTime; - _hoverOffDuration = 0.0f; - - const float GROW_DELAY = 1.0f; - const float GROW_RATE = 0.25f; - if (_hoverOnDuration > GROW_DELAY) { - _head.setScale(glm::mix(_head.getScale(), maxScale, GROW_RATE)); - } - - } else { - _hoverOnDuration = 0.0f; - _hoverOffDuration += deltaTime; - - const float SHRINK_DELAY = 1.0f; - const float SHRINK_RATE = 0.25f; - if (_hoverOffDuration > SHRINK_DELAY) { - _head.setScale(glm::mix(_head.getScale(), 1.0f, SHRINK_RATE)); - } - } - _skeletonModel.simulate(deltaTime); _head.setBodyRotation(glm::vec3(_bodyPitch, _bodyYaw, _bodyRoll)); glm::vec3 headPosition; diff --git a/interface/src/avatar/Avatar.h b/interface/src/avatar/Avatar.h index 2c54aa4a50..b3c373009f 100755 --- a/interface/src/avatar/Avatar.h +++ b/interface/src/avatar/Avatar.h @@ -227,8 +227,6 @@ protected: AvatarVoxelSystem _voxels; bool _moving; ///< set when position is changing - float _hoverOnDuration; - float _hoverOffDuration; // protected methods... glm::vec3 getBodyRightDirection() const { return getOrientation() * IDENTITY_RIGHT; }