From 6fb4e1f622a85aba5c7f59227bbf5cb74cb53d02 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Mon, 5 Jan 2015 12:23:55 -0800 Subject: [PATCH] oops, need to update angularVelocity after damping --- libraries/entities/src/EntityItem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 05ef9cd101..f18d2ff75a 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -662,13 +662,14 @@ void EntityItem::simulate(const quint64& now) { const float EPSILON_ANGULAR_VELOCITY_LENGTH = 0.0017453f; // ~0.1 degree/sec if (angularSpeed < EPSILON_ANGULAR_VELOCITY_LENGTH) { - setAngularVelocity(NO_ANGULAR_VELOCITY); + angularVelocity = NO_ANGULAR_VELOCITY; } else { float angle = timeElapsed * angularSpeed; glm::quat dQ = glm::angleAxis(angle, glm::normalize(angularVelocity)); rotation = glm::normalize(dQ * rotation); setRotation(rotation); } + setAngularVelocity(angularVelocity); } #ifdef USE_BULLET_PHYSICS