21-01-2020, 11:27 AM
(This post was last modified: 21-01-2020, 11:27 AM by josemendez.)
Indeed, it was a bug. Thanks you both for finding and reporting it.
Change lines 153-162 of ObiSkinnedCloth.cs with this:
That should fix it. I'm attaching the entire corrected file for convenience.
Let me know how it goes.
Change lines 153-162 of ObiSkinnedCloth.cs with this:
Code:
int solverIndex = batch.particleIndices[i];
int actorIndex = solver.particleToActor[solverIndex].indexInActor;
batch.skinPoints[i] = skinToSolver.MultiplyPoint3x4(sortedPoints[actorIndex]);
batch.skinNormals[i] = skinToSolver.MultiplyVector(sortedNormals[actorIndex]);
// Rigidly transform particles with zero skin radius and zero compliance:
if (Mathf.Approximately(batch.skinRadiiBackstop[i * 3], 0) & Mathf.Approximately(batch.skinCompliance[i], 0))
{
solver.invMasses[solverIndex] = 0;
solver.positions[solverIndex] = batch.skinPoints[i];
}
That should fix it. I'm attaching the entire corrected file for convenience.
Let me know how it goes.