diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-06 01:51:17 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-06 01:51:17 +0400 |
commit | aa02ca126b327c701d5f019d61f00398bcd6c932 (patch) | |
tree | d50e5882313b8a6ddc7e44176c9097c9e8b58dc7 /intern/rigidbody/rb_bullet_api.cpp | |
parent | 6afecfe579b1e6caa13427dfa2c4291590d9901d (diff) |
rigidbody: Invert spring damping range
Before 1 was no damping, which is inconsistent with the rest of the
simulation.
Diffstat (limited to 'intern/rigidbody/rb_bullet_api.cpp')
-rw-r--r-- | intern/rigidbody/rb_bullet_api.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp index c4a4532bad1..4a3367ad768 100644 --- a/intern/rigidbody/rb_bullet_api.cpp +++ b/intern/rigidbody/rb_bullet_api.cpp @@ -915,7 +915,8 @@ void RB_constraint_set_damping_6dof_spring(rbConstraint *con, float axis, float { btGeneric6DofSpringConstraint *constraint = reinterpret_cast<btGeneric6DofSpringConstraint*>(con); - constraint->setDamping(axis, damping); + // invert damping range so that 0 = no damping + constraint->setDamping(axis, 1.0f - damping); } void RB_constraint_set_spring_6dof_spring(rbConstraint *con, float axis, int enable) |