Closed GoogleCodeExporter closed 9 years ago
Fix also tested by this person
http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2507&p=9920#p9920
Original comment by d...@doc.ic.ac.uk
on 21 Aug 2008 at 5:08
Here is the essence of the patch:
- m_linearVelocity *= GEN_clamped((btScalar(1.) - timeStep *
m_linearDamping),
(btScalar)btScalar(0.0), (btScalar)btScalar(1.0));
- m_angularVelocity *= GEN_clamped((btScalar(1.) - timeStep *
m_angularDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0));
+ m_linearVelocity *= btPow(btScalar(1)-m_linearDamping, timeStep);
+ m_angularVelocity *= btPow(btScalar(1)-m_angularDamping, timeStep);
Original comment by d...@doc.ic.ac.uk
on 28 Aug 2008 at 11:20
sorry for the line breaks, next time I'll attach a proper patch...
Original comment by d...@doc.ic.ac.uk
on 28 Aug 2008 at 11:38
All those damping models are approximations, with a trade-off of
accuracy/realism
versus performance.
powf likely degrades performance, so we better allow the user to choose between
the
old and new method, and document both approximations.
Original comment by erwin.coumans
on 10 Sep 2008 at 7:13
Original comment by erwin.coumans
on 14 Sep 2008 at 6:29
It has been fixed and committed in the trunk:
http://code.google.com/p/bullet/source/detail?r=1343
Thanks for the patch/feedback!
Erwin
Original comment by erwin.coumans
on 30 Sep 2008 at 12:38
Original issue reported on code.google.com by
d...@doc.ic.ac.uk
on 8 Aug 2008 at 6:37