fix hinge limits

This commit is contained in:
Seth Alves 2017-04-29 14:28:56 -07:00
parent e52c94895e
commit 41f699ec9b

View file

@ -59,14 +59,12 @@ void ObjectConstraintHinge::updateHinge() {
float softness; float softness;
float biasFactor; float biasFactor;
float relaxationFactor; float relaxationFactor;
float maxImpulse;
withReadLock([&]{ withReadLock([&]{
axisInA = _axisInA; axisInA = _axisInA;
constraint = static_cast<btHingeConstraint*>(_constraint); constraint = static_cast<btHingeConstraint*>(_constraint);
low = _low; low = _low;
high = _high; high = _high;
maxImpulse = _maxImpulse;
biasFactor = _biasFactor; biasFactor = _biasFactor;
relaxationFactor = _relaxationFactor; relaxationFactor = _relaxationFactor;
softness = _softness; softness = _softness;
@ -76,8 +74,8 @@ void ObjectConstraintHinge::updateHinge() {
return; return;
} }
auto bulletAxisInA = glmToBullet(axisInA); // auto bulletAxisInA = glmToBullet(axisInA);
constraint->setAxis(bulletAxisInA); // constraint->setAxis(bulletAxisInA);
constraint->setLimit(low, high, softness, biasFactor, relaxationFactor); constraint->setLimit(low, high, softness, biasFactor, relaxationFactor);
} }