Make sure getVelocityChange returns the velocityChange

This commit is contained in:
Atlante45 2016-06-02 16:44:13 -07:00
parent da983ffe68
commit 3ca158265a

View file

@ -401,11 +401,10 @@ glm::vec3 CharacterController::getLinearVelocity() const {
} }
glm::vec3 CharacterController::getVelocityChange() const { glm::vec3 CharacterController::getVelocityChange() const {
glm::vec3 velocity(0.0f);
if (_rigidBody) { if (_rigidBody) {
velocity = bulletToGLM(_rigidBody->getLinearVelocity()); return bulletToGLM(_velocityChange);
} }
return velocity; return glm::vec3(0.0f);
} }
void CharacterController::clearMotors() { void CharacterController::clearMotors() {