18-08-2022, 09:47 PM
(17-08-2022, 09:31 AM)josemendez Wrote: Either set the particle's rest positions so that they intersect (particles that intersect at the rest pose skip self-collisions at runtime), or just give some extra slack to the distance constraints.
No, the index in the actor's batches list is kept intact.
Hi, I've tried to deactivate the distance constraint but it doesn't seem to work. Here is the code
Code:
ObiActor colon = obiSolver.actors[cutConstraint[0]];
// get a hold of the distance constraint
var distanceConstraints = colon.GetConstraintsByType(Oni.ConstraintType.Distance) as ObiConstraints<ObiDistanceConstraintsBatch>;
distanceConstraints.batches[cutConstraint[1]].DeactivateAllConstraints();
I'd also like to know how to correctly edit the distance of the distance constraint