fix spring bug
This commit is contained in:
@@ -328,7 +328,7 @@ void MassSpringSystemSimulator::Midpoint(Spring& spring, float timestep) {
|
|||||||
Vec3 PosNorm1 = PosVector / d;
|
Vec3 PosNorm1 = PosVector / d;
|
||||||
Vec3 PosNorm2 = -1 * PosNorm1;
|
Vec3 PosNorm2 = -1 * PosNorm1;
|
||||||
|
|
||||||
Vec3 Force = -m_fStiffness * (d - springs.at(0).initialLength) * PosNorm1;
|
Vec3 Force = -m_fStiffness * (d - spring.initialLength) * PosNorm1;
|
||||||
Vec3 Force2 = -1 * Force;
|
Vec3 Force2 = -1 * Force;
|
||||||
|
|
||||||
Vec3 oldAcc = calculateAcceleration(Force,m_fMass);
|
Vec3 oldAcc = calculateAcceleration(Force,m_fMass);
|
||||||
|
|||||||
Reference in New Issue
Block a user