mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
init zero gravity to agree with init hover state
This commit is contained in:
parent
d9e893ac21
commit
e44c2c8da3
2 changed files with 2 additions and 3 deletions
|
@ -361,6 +361,7 @@ void CharacterController::updateGravity() {
|
|||
if (_state == State::Hover || collisionGroup == BULLET_COLLISION_GROUP_COLLISIONLESS) {
|
||||
_gravity = 0.0f;
|
||||
} else {
|
||||
const float DEFAULT_CHARACTER_GRAVITY = -5.0f;
|
||||
_gravity = DEFAULT_CHARACTER_GRAVITY;
|
||||
}
|
||||
if (_rigidBody) {
|
||||
|
|
|
@ -32,8 +32,6 @@ const uint32_t PENDING_FLAG_JUMP = 1U << 3;
|
|||
const uint32_t PENDING_FLAG_UPDATE_COLLISION_GROUP = 1U << 4;
|
||||
const float DEFAULT_MIN_FLOOR_NORMAL_DOT_UP = cosf(PI / 3.0f);
|
||||
|
||||
const float DEFAULT_CHARACTER_GRAVITY = -5.0f;
|
||||
|
||||
class btRigidBody;
|
||||
class btCollisionWorld;
|
||||
class btDynamicsWorld;
|
||||
|
@ -183,7 +181,7 @@ protected:
|
|||
bool _stepUpEnabled { true };
|
||||
bool _hasSupport;
|
||||
|
||||
btScalar _gravity { DEFAULT_CHARACTER_GRAVITY };
|
||||
btScalar _gravity { 0.0f };
|
||||
|
||||
btScalar _jumpSpeed;
|
||||
btScalar _followTime;
|
||||
|
|
Loading…
Reference in a new issue