|
@@ -168,7 +168,7 @@ void PathConstraint::CalculateConstraintProperties(float inDeltaTime)
|
|
mHingeConstraintPart.CalculateConstraintProperties(*mBody1, transform1.GetRotation(), mPathBinormal, *mBody2, transform2.GetRotation(), path_to_world_2.GetAxisY());
|
|
mHingeConstraintPart.CalculateConstraintProperties(*mBody1, transform1.GetRotation(), mPathBinormal, *mBody2, transform2.GetRotation(), path_to_world_2.GetAxisY());
|
|
break;
|
|
break;
|
|
|
|
|
|
- case EPathRotationConstraintType::ConstainToPath:
|
|
|
|
|
|
+ case EPathRotationConstraintType::ConstrainToPath:
|
|
// We need to calculate the inverse of the rotation from body 1 to body 2 for the current path position (see: RotationEulerConstraintPart::sGetInvInitialOrientation)
|
|
// We need to calculate the inverse of the rotation from body 1 to body 2 for the current path position (see: RotationEulerConstraintPart::sGetInvInitialOrientation)
|
|
// RotationBody2 = RotationBody1 * InitialOrientation <=> InitialOrientation^-1 = RotationBody2^-1 * RotationBody1
|
|
// RotationBody2 = RotationBody1 * InitialOrientation <=> InitialOrientation^-1 = RotationBody2^-1 * RotationBody1
|
|
// We can express RotationBody2 in terms of RotationBody1: RotationBody2 = RotationBody1 * PathToBody1 * RotationClosestPointOnPath * PathToBody2^-1
|
|
// We can express RotationBody2 in terms of RotationBody1: RotationBody2 = RotationBody1 * PathToBody1 * RotationClosestPointOnPath * PathToBody2^-1
|
|
@@ -244,7 +244,7 @@ void PathConstraint::WarmStartVelocityConstraint(float inWarmStartImpulseRatio)
|
|
mHingeConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
|
|
mHingeConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
|
|
break;
|
|
break;
|
|
|
|
|
|
- case EPathRotationConstraintType::ConstainToPath:
|
|
|
|
|
|
+ case EPathRotationConstraintType::ConstrainToPath:
|
|
case EPathRotationConstraintType::FullyConstrained:
|
|
case EPathRotationConstraintType::FullyConstrained:
|
|
mRotationConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
|
|
mRotationConstraintPart.WarmStart(*mBody1, *mBody2, inWarmStartImpulseRatio);
|
|
break;
|
|
break;
|
|
@@ -306,7 +306,7 @@ bool PathConstraint::SolveVelocityConstraint(float inDeltaTime)
|
|
rot = mHingeConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
|
|
rot = mHingeConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
|
|
break;
|
|
break;
|
|
|
|
|
|
- case EPathRotationConstraintType::ConstainToPath:
|
|
|
|
|
|
+ case EPathRotationConstraintType::ConstrainToPath:
|
|
case EPathRotationConstraintType::FullyConstrained:
|
|
case EPathRotationConstraintType::FullyConstrained:
|
|
rot = mRotationConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
|
|
rot = mRotationConstraintPart.SolveVelocityConstraint(*mBody1, *mBody2);
|
|
break;
|
|
break;
|
|
@@ -350,7 +350,7 @@ bool PathConstraint::SolvePositionConstraint(float inDeltaTime, float inBaumgart
|
|
rot = mHingeConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, inBaumgarte);
|
|
rot = mHingeConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, inBaumgarte);
|
|
break;
|
|
break;
|
|
|
|
|
|
- case EPathRotationConstraintType::ConstainToPath:
|
|
|
|
|
|
+ case EPathRotationConstraintType::ConstrainToPath:
|
|
case EPathRotationConstraintType::FullyConstrained:
|
|
case EPathRotationConstraintType::FullyConstrained:
|
|
rot = mRotationConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, mInvInitialOrientation, inBaumgarte);
|
|
rot = mRotationConstraintPart.SolvePositionConstraint(*mBody1, *mBody2, mInvInitialOrientation, inBaumgarte);
|
|
break;
|
|
break;
|