code review

This commit is contained in:
Seth Alves 2017-05-01 15:32:17 -07:00
parent 6808cf62b6
commit 3ec3005c6d
3 changed files with 2 additions and 10 deletions

View file

@ -85,10 +85,10 @@ bool ObjectActionSpring::getTarget(float deltaTimeStep, glm::quat& rotation, glm
linearTimeScale = _linearTimeScale; linearTimeScale = _linearTimeScale;
angularTimeScale = _angularTimeScale; angularTimeScale = _angularTimeScale;
if (_otherID != QUuid()) { if (!_otherID.isNull()) {
if (other) { if (other) {
rotation = _desiredRotationalTarget * other->getRotation(); rotation = _desiredRotationalTarget * other->getRotation();
position = _desiredPositionalTarget + other->getPosition(); position = other->getRotation() * _desiredPositionalTarget + other->getPosition();
} else { } else {
// we should have an "other" but can't find it, so disable the spring. // we should have an "other" but can't find it, so disable the spring.
linearTimeScale = FLT_MAX; linearTimeScale = FLT_MAX;

View file

@ -74,8 +74,6 @@ void ObjectConstraintHinge::updateHinge() {
return; return;
} }
// auto bulletAxisInA = glmToBullet(axisInA);
// constraint->setAxis(bulletAxisInA);
constraint->setLimit(low, high, softness, biasFactor, relaxationFactor); constraint->setLimit(low, high, softness, biasFactor, relaxationFactor);
} }

View file

@ -24,15 +24,9 @@ ObjectConstraintSlider::ObjectConstraintSlider(const QUuid& id, EntityItemPointe
_pointInA(glm::vec3(0.0f)), _pointInA(glm::vec3(0.0f)),
_axisInA(glm::vec3(0.0f)) _axisInA(glm::vec3(0.0f))
{ {
#if WANT_DEBUG
qCDebug(physics) << "ObjectConstraintSlider::ObjectConstraintSlider";
#endif
} }
ObjectConstraintSlider::~ObjectConstraintSlider() { ObjectConstraintSlider::~ObjectConstraintSlider() {
#if WANT_DEBUG
qCDebug(physics) << "ObjectConstraintSlider::~ObjectConstraintSlider";
#endif
} }
QList<btRigidBody*> ObjectConstraintSlider::getRigidBodies() { QList<btRigidBody*> ObjectConstraintSlider::getRigidBodies() {