- Home /
Collider looses cloth
I use a box with 30x30x30 vertices for cloth. Four Capsule colliders hold it on the top.
Problem #1 If i scale the colliders to hit a single vertice it won't hold the cloth. ![alt text][1] I have to make them really large (which makes the attatched pieces look ugly) ![alt text][2]
Problem#2 When I move the colliders fast, the cloth detatches and falls down. I need a way to attatch the cloth on single points onto objects, which I can move with c# script
Answer by JBehreandt · Apr 29, 2016 at 06:25 AM
I tried to recreate what you're trying to do based on your screen caps. I wanted to ask, have you gone into the Cloth component, clicked on Edit Constraints and then painted green (0.2) the vertices you want to be pinned? I made a cube GameObject the parent of the GameObject with the Cloth component, set the pins and didn't have a problem with the cloth detaching from the box when I moved the box's transform. (Unless I'm not understanding correctly... is the mesh used by the Skinned Mesh Renderer component affiliated with the Cloth component a plane? It's a little hard for me to tell from the description.)
Answer by fleischverpackung · Apr 29, 2016 at 08:39 AM
Hi there, thanks for trying!
I used a box with 6 sides of cloth, each of them 30x30 vertices. Then I wanted to lock some vertices to colliders. You can either edit the constraints to fix a cloth vertice, or you can start the simulation with a collider that surrounds the vertices you want to be fixed to that collider. I mean it does work, but it seems to have problems when the collider just contains one vertex. In Obi cloth this works flawlessly! One collider, one vertice - bombproof. Within the new Unity5 cloth engine this seems a little big buggy and the collider looses the cloth.
Obi Cloth took a long while to be made, and yes, it is way more tested and improved than the "official" cloth. Thanks for your words about our asset. You can see more about all those assets here :-) http://obi.virtualmethodstudio.com/