mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 05:43:36 +02:00
Fix vertical drag in gracefulControls.js
This commit is contained in:
parent
a685bbe541
commit
3b60621e78
1 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,9 @@ function update(dt) {
|
|||
velocity.z = Math.max(-MAX_SPEED, Math.min(MAX_SPEED, velocity.z));
|
||||
var v = Quat.rotate(MyAvatar.headOrientation, velocity);
|
||||
|
||||
if (velocityVertical == 0) {
|
||||
targetVelocityVertical -= (velocityVertical * DRAG_COEFFICIENT * dt);
|
||||
}
|
||||
velocityVertical += targetVelocityVertical;
|
||||
velocityVertical = Math.max(-MAX_SPEED, Math.min(MAX_SPEED, velocityVertical));
|
||||
v.y += velocityVertical;
|
||||
|
|
Loading…
Reference in a new issue