Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Trying to add DistanceConstraint for my TearableCloth but getting IndexOutOfRange
#26
(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
Reply


Messages In This Thread
RE: Trying to add DistanceConstraint for my TearableCloth but getting IndexOutOfRange - by snowtv - 18-08-2022, 09:47 PM