Interactive Cloth: Enabling 2-way interaction in attached colliders through script

:shock:
Hello,

I have successfully used the attached colliders in an interactive cloth with 2-way interaction enabled in Unity editor.

Now I am trying to attach colliders through code, and have had some difficulties because I need to do it before the collision response acts and the meshes stop overlapping.

But that is not the question I have. When I successfully attach a collider within a C# script, 2-Way interaction is not enabled it seems, so I can freely move the other object and stretch the interactive cloth. I would like the interactive cloth to apply force back to the object, and this is done in the editor enabling 2-way interaction.

How can I enable 2-way interaction from within a script in an interactive cloth?

Thanks8-)

https://docs.unity3d.com/Documentation/ScriptReference/InteractiveCloth.AttachToCollider.html

Third boolean of the InteractiveCloth.AttachToCollider function