From ae3b58a33f6172693293deca12a914a93044cebf Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Mon, 28 Apr 2014 16:46:16 -0700 Subject: [PATCH] use setGravity() instead of setting it directly --- interface/src/avatar/MyAvatar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 0a3e788042..40e350dcb7 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -126,7 +126,7 @@ void MyAvatar::update(float deltaTime) { head->setAudioAverageLoudness(audio->getAudioAverageInputLoudness()); if (_motionBehaviors & AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY) { - _gravity = Application::getInstance()->getEnvironment()->getGravity(getPosition()); + setGravity(Application::getInstance()->getEnvironment()->getGravity(getPosition())); } simulate(deltaTime); @@ -1159,7 +1159,7 @@ void MyAvatar::updateMotionBehaviors() { _motionBehaviors &= ~AVATAR_MOTION_OBEY_LOCAL_GRAVITY; } if (! (_motionBehaviors & (AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY | AVATAR_MOTION_OBEY_LOCAL_GRAVITY))) { - _gravity = glm::vec3(0.0f); + setGravity(glm::vec3(0.0f)); } } @@ -1181,7 +1181,7 @@ void MyAvatar::setMotionBehaviors(quint32 flags) { _motionBehaviors &= ~AVATAR_MOTION_OBEY_LOCAL_GRAVITY; setGravity(Application::getInstance()->getEnvironment()->getGravity(getPosition())); } else if (! (_motionBehaviors & (AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY | AVATAR_MOTION_OBEY_LOCAL_GRAVITY))) { - _gravity = glm::vec3(0.0f); + setGravity(glm::vec3(0.0f)); } }