Some fixes to work with constraint angle limits close to -PI or PI

This commit is contained in:
rponom
2009-06-12 01:23:47 +00:00
parent 699ba8f5b2
commit 99f6ff7cf3
11 changed files with 121 additions and 27 deletions

View File

@@ -799,6 +799,7 @@ void btSliderConstraint::testAngLimits(void)
const btVector3 axisA1 = m_calculatedTransformA.getBasis().getColumn(2);
const btVector3 axisB0 = m_calculatedTransformB.getBasis().getColumn(1);
btScalar rot = btAtan2Fast(axisB0.dot(axisA1), axisB0.dot(axisA0));
rot = btAdjustAngleToLimits(rot, m_lowerAngLimit, m_upperAngLimit);
m_angPos = rot;
if(rot < m_lowerAngLimit)
{