Hey so I'm trying to tear a ribbon in half at a specific point. I've been doing as described on this page http://obi.virtualmethodstudio.com/tutor...aints.html but I'm haivng a hard time figuring out where to tear. How do I figure out what the constraintindex of a specific point is? So far I've managed to guess my way to two out of three tear spots, but I've been guessing for a while now with no luck figuring out the last one...
Code:
public void CutAtPoints()
{
cloth.DistanceConstraints.RemoveFromSolver(null);
cloth.BendingConstraints.RemoveFromSolver(null);
for (int i = 0; i < constraintsToCut.Count; i++)
{
cloth.Tear(constraintsToCut[i]);
}
cloth.BendingConstraints.AddToSolver(cloth);
cloth.DistanceConstraints.AddToSolver(cloth);
cloth.BendingConstraints.SetActiveConstraints();
cloth.UpdateDeformableTriangles();
cloth.Solver.UpdateActiveParticles();
}