mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:23:57 +02:00
Fix for null gravity when falling off ledges
This commit is contained in:
parent
62dc250237
commit
9a804e19fc
1 changed files with 1 additions and 0 deletions
|
@ -261,6 +261,7 @@ void CharacterController::playerStep(btCollisionWorld* dynaWorld, btScalar dt) {
|
|||
const float HORIZONTAL_FOLLOW_TIMESCALE = 0.1f;
|
||||
const float VERTICAL_FOLLOW_TIMESCALE = (_state == State::Hover) ? HORIZONTAL_FOLLOW_TIMESCALE : 20.0f;
|
||||
glm::quat worldFrameRotation; // identity
|
||||
vel.setY(0.0f); // don't allow any vertical component of the follow velocity to enter the _targetVelocity.
|
||||
addMotor(bulletToGLM(vel), worldFrameRotation, HORIZONTAL_FOLLOW_TIMESCALE, VERTICAL_FOLLOW_TIMESCALE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue