This commit is contained in:
Seth Alves 2017-04-14 13:43:48 -07:00
parent 07b23b8235
commit 708008d8a5

View file

@ -130,8 +130,6 @@ bool ObjectConstraintHinge::updateArguments(QVariantMap arguments) {
float softness; float softness;
float biasFactor; float biasFactor;
float relaxationFactor; float relaxationFactor;
float angle;
float angleSet { false };
bool needUpdate = false; bool needUpdate = false;
bool somethingChanged = ObjectDynamic::updateArguments(arguments); bool somethingChanged = ObjectDynamic::updateArguments(arguments);
@ -198,24 +196,17 @@ bool ObjectConstraintHinge::updateArguments(QVariantMap arguments) {
relaxationFactor = _relaxationFactor; relaxationFactor = _relaxationFactor;
} }
ok = true;
angle = EntityDynamicInterface::extractFloatArgument("hinge constraint", arguments, "angle", ok, false);
if (ok) {
angleSet = true;
}
if (somethingChanged || if (somethingChanged ||
pivotInA != _pivotInA || pivotInA != _pivotInA ||
axisInA != _axisInA || axisInA != _axisInA ||
otherEntityID != _otherEntityID ||
pivotInB != _pivotInB || pivotInB != _pivotInB ||
axisInB != _axisInB || axisInB != _axisInB ||
low != _low || low != _low ||
high != _high || high != _high ||
softness != _softness || softness != _softness ||
biasFactor != _biasFactor || biasFactor != _biasFactor ||
relaxationFactor != _relaxationFactor || relaxationFactor != _relaxationFactor) {
angleSet) {
// something changed // something changed
needUpdate = true; needUpdate = true;
} }
@ -241,10 +232,7 @@ bool ObjectConstraintHinge::updateArguments(QVariantMap arguments) {
ownerEntity->setDynamicDataDirty(true); ownerEntity->setDynamicDataDirty(true);
ownerEntity->setDynamicDataNeedsTransmit(true); ownerEntity->setDynamicDataNeedsTransmit(true);
} }
// _constraint->setAngle(angle);
}); });
// activateBody();
} }
return true; return true;