From 9a804e19fc68cd3747a0f2fc95655d0a259c83f2 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Tue, 27 Sep 2016 18:44:54 -0700 Subject: [PATCH] Fix for null gravity when falling off ledges --- libraries/physics/src/CharacterController.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/physics/src/CharacterController.cpp b/libraries/physics/src/CharacterController.cpp index 8405bda208..0465362dce 100755 --- a/libraries/physics/src/CharacterController.cpp +++ b/libraries/physics/src/CharacterController.cpp @@ -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); }