mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:13:28 +02:00
add comment
This commit is contained in:
parent
5b4b0a7c25
commit
ff6c309d8b
1 changed files with 6 additions and 0 deletions
|
@ -837,5 +837,11 @@ void EntityMotionState::clearObjectVelocities() const {
|
|||
|
||||
void EntityMotionState::saveKinematicState(btScalar timeStep) {
|
||||
_body->saveKinematicState(timeStep);
|
||||
|
||||
// This is a WORKAROUND for a quirk in Bullet: due to floating point error slow spinning kinematic objects will
|
||||
// have a measured angular velocity of zero. This probably isn't a bug that the Bullet team is interested in
|
||||
// fixing since there is one very simple workaround: use double-precision math for the physics simulation.
|
||||
// We're not ready migrate to double-precision yet so we explicitly work around it by slamming the RigidBody's
|
||||
// angular velocity with the value in the entity.
|
||||
_body->setAngularVelocity(glmToBullet(_entity->getWorldAngularVelocity()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue