mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
use setGravity() instead of setting it directly
This commit is contained in:
parent
c7dbc5984f
commit
ae3b58a33f
1 changed files with 3 additions and 3 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue