fixed issue with de-normalized quaternion, causing acosf to fail
See http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1440 Thanks Proctoid for reporting.
This commit is contained in:
@@ -121,6 +121,10 @@ public:
|
||||
dmat.getRotation(dorn);
|
||||
#endif//USE_QUATERNION_DIFF
|
||||
|
||||
///floating point inaccuracy can lead to w component > 1..., which breaks
|
||||
|
||||
dorn.normalize();
|
||||
|
||||
angle = dorn.getAngle();
|
||||
axis = btVector3(dorn.x(),dorn.y(),dorn.z());
|
||||
axis[3] = btScalar(0.);
|
||||
|
||||
Reference in New Issue
Block a user