Remove growing head behavior.

This commit is contained in:
Andrzej Kapolka 2013-11-05 16:11:12 -08:00
parent 9460fb87c2
commit ae4db63368
2 changed files with 0 additions and 28 deletions

View file

@ -96,8 +96,6 @@ Avatar::Avatar(Node* owningNode) :
_leadingAvatar(NULL), _leadingAvatar(NULL),
_voxels(this), _voxels(this),
_moving(false), _moving(false),
_hoverOnDuration(0.0f),
_hoverOffDuration(0.0f),
_initialized(false), _initialized(false),
_handHoldingPosition(0.0f, 0.0f, 0.0f), _handHoldingPosition(0.0f, 0.0f, 0.0f),
_maxArmLength(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); _skeletonModel.simulate(deltaTime);
_head.setBodyRotation(glm::vec3(_bodyPitch, _bodyYaw, _bodyRoll)); _head.setBodyRotation(glm::vec3(_bodyPitch, _bodyYaw, _bodyRoll));
glm::vec3 headPosition; glm::vec3 headPosition;

View file

@ -227,8 +227,6 @@ protected:
AvatarVoxelSystem _voxels; AvatarVoxelSystem _voxels;
bool _moving; ///< set when position is changing bool _moving; ///< set when position is changing
float _hoverOnDuration;
float _hoverOffDuration;
// protected methods... // protected methods...
glm::vec3 getBodyRightDirection() const { return getOrientation() * IDENTITY_RIGHT; } glm::vec3 getBodyRightDirection() const { return getOrientation() * IDENTITY_RIGHT; }