|
|
@ -41,7 +41,7 @@ void UJoint::SolvePosition(const double H) const{ |
|
|
|
const double W1 = L1->GetPositionalInverseMass(R1, N); |
|
|
|
const double W1 = L1->GetPositionalInverseMass(R1, N); |
|
|
|
const double W2 = L2->GetPositionalInverseMass(R2, N); |
|
|
|
const double W2 = L2->GetPositionalInverseMass(R2, N); |
|
|
|
|
|
|
|
|
|
|
|
constexpr double A = 1. / 10000000; // Compliance (inverse of stiffness)
|
|
|
|
constexpr double A = 1. / 1000000; // Compliance (inverse of stiffness)
|
|
|
|
const Vector3d P = -C / (W1 + W2 + A / (H * H)) * N; |
|
|
|
const Vector3d P = -C / (W1 + W2 + A / (H * H)) * N; |
|
|
|
|
|
|
|
|
|
|
|
L1->Position += P / M1; |
|
|
|
L1->Position += P / M1; |
|
|
|