mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
another round of small adjustments
This commit is contained in:
parent
6d8fe870e4
commit
3cc54c5118
1 changed files with 3 additions and 2 deletions
|
@ -763,8 +763,9 @@ void CharacterController::updateState() {
|
|||
case State::Hover:
|
||||
btScalar horizontalSpeed = (velocity - velocity.dot(_currentUp) * _currentUp).length();
|
||||
bool flyingFast = horizontalSpeed > (MAX_WALKING_SPEED * 0.75f);
|
||||
|
||||
if ((_floorDistance < MIN_HOVER_HEIGHT) && !jumpButtonHeld && !flyingFast) {
|
||||
if (!_flyingAllowed && rayHasHit) {
|
||||
SET_STATE(State::InAir, "flying not allowed");
|
||||
} else if ((_floorDistance < MIN_HOVER_HEIGHT) && !jumpButtonHeld && !flyingFast) {
|
||||
SET_STATE(State::InAir, "near ground");
|
||||
} else if (((_floorDistance < FLY_TO_GROUND_THRESHOLD) || _hasSupport) && !flyingFast) {
|
||||
SET_STATE(State::Ground, "touching ground");
|
||||
|
|
Loading…
Reference in a new issue