mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:24:08 +02:00
remove old pre-movement of avatar in gravity
This commit is contained in:
parent
c0ef05f69f
commit
52d8ece38a
1 changed files with 1 additions and 2 deletions
|
@ -542,10 +542,9 @@ void Avatar::simulate(float deltaTime, Transmitter* transmitter) {
|
|||
// For gravity, always move the avatar by the amount driven by gravity, so that the collision
|
||||
// routines will detect it and collide every frame when pulled by gravity to a surface
|
||||
//
|
||||
const float MIN_DISTANCE_AFTER_COLLISION_FOR_GRAVITY = 0.01f;
|
||||
const float MIN_DISTANCE_AFTER_COLLISION_FOR_GRAVITY = 0.02f;
|
||||
if (glm::length(_position - _lastCollisionPosition) > MIN_DISTANCE_AFTER_COLLISION_FOR_GRAVITY) {
|
||||
_velocity += _scale * _gravity * (GRAVITY_EARTH * deltaTime);
|
||||
_position += _scale * _gravity * (GRAVITY_EARTH * deltaTime) * deltaTime;
|
||||
}
|
||||
}
|
||||
updateCollisionWithEnvironment(deltaTime);
|
||||
|
|
Loading…
Reference in a new issue