Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What can I adjust to stop a cloth from doing through a collision mesh?
#24
(02-02-2022, 11:22 PM)MoonBoop Wrote: I'll have to wait to hear back if it is possible to share the project or not, but if so then Ill be on contact soon about sharing it.

The thickness was only set to 0.01f

The particle renderer doesn't really shed much light as to what is happening.

Try the following, add this method to the end of ObiStitcher.cs:

Code:
public void OnDrawGizmos()
        {
            Gizmos.color = Color.red;
            Gizmos.matrix = actor1.solver.transform.localToWorldMatrix;
            for (int i = 0; i < stitches.Count; i++)
            {
                int p1 = particleIndices[i * 2];
                int p2 = particleIndices[i * 2 + 1];
                Gizmos.DrawLine(actor1.solver.renderablePositions[p1], actor1.solver.renderablePositions[p2]);
            }
        }

Then, enable gizmos in your scene view (button at the top right). This will show the stitch constraints as red lines at runtime:

[Image: 0yYk4Ds.png]

This way you can verify if the correct particles are being stitched.

Also, setting the relaxation factor in the solver->constraints->stitch constraints to 0.1 will "smoothen out" the constraints, allowing you to see exactly what's happening. You can also reduce the project's timescale for a slow-motion effect for better insight.


(02-02-2022, 11:22 PM)MoonBoop Wrote: Would a meeting screen share be possible?

Don't know if there's anything a screen meeting would allow us to do that can't be done here, specially since this can probably only be solved by debugging trough the code.
Reply


Messages In This Thread
RE: What can I adjust to stop a cloth from doing through a collision mesh? - by josemendez - 03-02-2022, 08:23 PM