24-06-2021, 04:39 PM
(24-06-2021, 04:19 PM)josemendez Wrote: Hi,
Can you share the code you have so far? Otherwise helping you it’s going to be hard
Code:
ObiSolver.ParticleInActor pa = solver.particleToActor[particleIndex];
//solver.colors[particleIndex] = Color.black;
obiRopes[0].Tear(obiRopes[0].elements[pa.indexInActor + 1]);
for (int i = pa.indexInActor + 1; i < obiRopes[0].elements.Count; i++)
{
obiRopes[0].DeactivateParticle(solver.particleToActor[obiRopes[0].elements[i].particle2].indexInActor);
obiRopes[0].elements.RemoveAt(i);
}
obiRopes[0].RebuildConstraintsFromElements();
foreach (ObiRopeCursor cr in cursors)
{
cr.cursorMu = (float)pa.indexInActor / (float)obiRopes[0].activeParticleCount;
cr.UpdateCursor();
}