disable environment gravity when not set in menu

This commit is contained in:
Andrew Meadows 2014-05-06 14:56:16 -07:00
parent 68b0e91630
commit 80ed8e7cf0

View file

@ -1382,6 +1382,8 @@ void MyAvatar::updateMotionBehaviorsFromMenu() {
_motionBehaviors |= AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY;
// Environmental and Local gravities are incompatible. Environmental setting trumps local.
_motionBehaviors &= ~AVATAR_MOTION_OBEY_LOCAL_GRAVITY;
} else {
_motionBehaviors &= ~AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY;
}
if (! (_motionBehaviors & (AVATAR_MOTION_OBEY_ENVIRONMENTAL_GRAVITY | AVATAR_MOTION_OBEY_LOCAL_GRAVITY))) {
setGravity(glm::vec3(0.0f));