bugfix
This commit is contained in:
parent
86cfec55f0
commit
93f04140b9
@ -891,6 +891,7 @@ void b3Cloth::Solve(float32 dt, const b3Vec3& gravity)
|
||||
solverDef.forceCapacity = m_forceList.m_count;
|
||||
solverDef.bodyContactCapacity = m_particleList.m_count;
|
||||
solverDef.particleContactCapacity = m_particleContactList.m_count;
|
||||
solverDef.triangleContactCapacity = m_triangleContactList.m_count;
|
||||
|
||||
b3ClothSolver solver(solverDef);
|
||||
|
||||
|
@ -279,7 +279,7 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
||||
InitializeParticleContactConstraints();
|
||||
|
||||
// Initialize triangle contact constraints
|
||||
// InitializeTriangleContactConstraints();
|
||||
InitializeTriangleContactConstraints();
|
||||
|
||||
// Warm start velocity constraints
|
||||
WarmStart();
|
||||
@ -291,7 +291,7 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
||||
{
|
||||
SolveBodyContactVelocityConstraints();
|
||||
SolveParticleContactVelocityConstraints();
|
||||
// SolveTriangleContactVelocityConstraints();
|
||||
SolveTriangleContactVelocityConstraints();
|
||||
}
|
||||
|
||||
// Store impulses to improve convergence
|
||||
@ -307,9 +307,8 @@ void b3ClothSolver::Solve(float32 dt, const b3Vec3& gravity)
|
||||
for (u32 i = 0; i < kPositionIterations; ++i)
|
||||
{
|
||||
bool particleContactsSolved = SolveParticleContactPositionConstraints();
|
||||
// bool triangleContactsSolved = SolveTriangleContactPositionConstraints();
|
||||
//if (particleContactsSolved && triangleContactsSolved)
|
||||
if (particleContactsSolved)
|
||||
bool triangleContactsSolved = SolveTriangleContactPositionConstraints();
|
||||
if (particleContactsSolved && triangleContactsSolved)
|
||||
{
|
||||
positionSolved = true;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user