mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
less magic
This commit is contained in:
parent
a10ae20bf7
commit
4e1c1aec0a
1 changed files with 2 additions and 1 deletions
|
@ -469,7 +469,8 @@ void CharacterController::setFollowParameters(const glm::mat4& desiredWorldBodyM
|
|||
float newSpeed = newFollowVelocity.length() + dontDivideByZero;
|
||||
float oldSpeed = _followVelocity.length();
|
||||
const float VERY_SLOW_HOVER_SPEED = 0.25f;
|
||||
if (oldSpeed / newSpeed > 100.0f && newSpeed < VERY_SLOW_HOVER_SPEED) {
|
||||
const FAST_CHANGE_SPEED_RATIO = 100.0f;
|
||||
if (oldSpeed / newSpeed > FAST_CHANGE_SPEED_RATIO && newSpeed < VERY_SLOW_HOVER_SPEED) {
|
||||
// avatar is stopping quickly
|
||||
// HACK: slam _followVelocity and _rigidBody velocity immediately
|
||||
_followVelocity = newFollowVelocity;
|
||||
|
|
Loading…
Reference in a new issue