Showing the changes to libraries/physics/src/ObjectActionSpring.cpp (1 of 4 files). Show all
Unified · Split
| @@ -64,8 +64,9 @@ void ObjectActionSpring::updateAction(btCollisionWorld* collisionWorld, btScalar · 63 unmodified lines | |||
| 64 | glm::quat deltaQ = _rotationalTarget * qZeroInverse; | 64 | glm::quat deltaQ = _rotationalTarget * qZeroInverse; |
| 65 | glm::vec3 axis = glm::axis(deltaQ); | 65 | glm::vec3 axis = glm::axis(deltaQ); |
| 66 | float angle = glm::angle(deltaQ); | 66 | float angle = glm::angle(deltaQ); |
| 67 | glm::vec3 newAngularVelocity = (-angle / _angularTimeScale) * glm::normalize(axis); | 67 | glm::vec3 newAngularVelocity = (angle / _angularTimeScale) * glm::normalize(axis); |
| 68 | rigidBody->setAngularVelocity(glmToBullet(newAngularVelocity)); | 68 | rigidBody->setAngularVelocity(glmToBullet(newAngularVelocity)); |
| 69 | rigidBody->activate(); | ||
| 69 | } | 70 | } |
| 70 | } | 71 | } |
| 71 | } | 72 | } |