mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-28 07:50:37 +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) {
|
if (_state == State::Hover || collisionGroup == BULLET_COLLISION_GROUP_COLLISIONLESS) {
|
||||||
_gravity = 0.0f;
|
_gravity = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
|
const float DEFAULT_CHARACTER_GRAVITY = -5.0f;
|
||||||
_gravity = DEFAULT_CHARACTER_GRAVITY;
|
_gravity = DEFAULT_CHARACTER_GRAVITY;
|
||||||
}
|
}
|
||||||
if (_rigidBody) {
|
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 uint32_t PENDING_FLAG_UPDATE_COLLISION_GROUP = 1U << 4;
|
||||||
const float DEFAULT_MIN_FLOOR_NORMAL_DOT_UP = cosf(PI / 3.0f);
|
const float DEFAULT_MIN_FLOOR_NORMAL_DOT_UP = cosf(PI / 3.0f);
|
||||||
|
|
||||||
const float DEFAULT_CHARACTER_GRAVITY = -5.0f;
|
|
||||||
|
|
||||||
class btRigidBody;
|
class btRigidBody;
|
||||||
class btCollisionWorld;
|
class btCollisionWorld;
|
||||||
class btDynamicsWorld;
|
class btDynamicsWorld;
|
||||||
|
@ -183,7 +181,7 @@ protected:
|
||||||
bool _stepUpEnabled { true };
|
bool _stepUpEnabled { true };
|
||||||
bool _hasSupport;
|
bool _hasSupport;
|
||||||
|
|
||||||
btScalar _gravity { DEFAULT_CHARACTER_GRAVITY };
|
btScalar _gravity { 0.0f };
|
||||||
|
|
||||||
btScalar _jumpSpeed;
|
btScalar _jumpSpeed;
|
||||||
btScalar _followTime;
|
btScalar _followTime;
|
||||||
|
|
Loading…
Reference in a new issue