mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:29:03 +02:00
Transition to hover if falling and height above ground is greater than the threshold.
This commit is contained in:
parent
6969f014fc
commit
9b9b62d0e4
1 changed files with 3 additions and 0 deletions
|
@ -756,6 +756,9 @@ void CharacterController::updateState() {
|
||||||
SET_STATE(State::Hover, "double jump button");
|
SET_STATE(State::Hover, "double jump button");
|
||||||
} else if ((jumpButtonHeld || vertTargetSpeedIsNonZero) && (now - _jumpButtonDownStartTime) > JUMP_TO_HOVER_PERIOD) {
|
} else if ((jumpButtonHeld || vertTargetSpeedIsNonZero) && (now - _jumpButtonDownStartTime) > JUMP_TO_HOVER_PERIOD) {
|
||||||
SET_STATE(State::Hover, "jump button held");
|
SET_STATE(State::Hover, "jump button held");
|
||||||
|
} else if (_floorDistance > _scaleFactor * DEFAULT_AVATAR_FALL_HEIGHT) {
|
||||||
|
// Transition to hover if we are above the fall threshold
|
||||||
|
SET_STATE(State::Hover, "above fall threshold");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue