mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
Fix omitted return in MyAvatar::scaleMotorSpeed
This commit is contained in:
parent
874fb6b6d7
commit
8b670110a9
1 changed files with 5 additions and 0 deletions
|
@ -3397,7 +3397,12 @@ glm::vec3 MyAvatar::scaleMotorSpeed(const glm::vec3 forward, const glm::vec3 rig
|
||||||
} else {
|
} else {
|
||||||
// Desktop mode.
|
// Desktop mode.
|
||||||
direction = (zSpeed * forward) + (xSpeed * right);
|
direction = (zSpeed * forward) + (xSpeed * right);
|
||||||
|
auto length = glm::length(direction);
|
||||||
|
if (length > EPSILON) {
|
||||||
|
direction /= length;
|
||||||
|
}
|
||||||
direction *= getWalkSpeed() * _walkSpeedScalar;
|
direction *= getWalkSpeed() * _walkSpeedScalar;
|
||||||
|
return direction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue