Skip to content

Commit

Permalink
Change increase spring constant
Browse files Browse the repository at this point in the history
  • Loading branch information
xorz57 committed Jan 29, 2024
1 parent 3edfe56 commit d410e92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cloth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Cloth::Cloth(const glm::vec2 &position, unsigned int rows, unsigned int cols, fl
if (col < cols - 1) {
Particle &particle1 = particles[row * cols + col];
Particle &particle2 = particles[row * cols + col + 1];
springs.emplace_back(particle1, particle2, distance(particle1, particle2), 32.0f, 1.0f);
springs.emplace_back(particle1, particle2, distance(particle1, particle2), 128.0f, 1.0f);
}
if (row < rows - 1) {
Particle &particle1 = particles[row * cols + col];
Particle &particle2 = particles[(row + 1) * cols + col];
springs.emplace_back(particle1, particle2, distance(particle1, particle2), 32.0f, 1.0f);
springs.emplace_back(particle1, particle2, distance(particle1, particle2), 128.0f, 1.0f);
}
}
}
Expand Down

0 comments on commit d410e92

Please sign in to comment.