- Home /
How to return mesh of interactive cloth?
I have been experimenting with mesh deformation lately. One method I've been trying is to switch between rigidbodies and interactive cloths. Basically, I created a basic sphere object and wrote a script that told it to initiate the interactive cloth and cloth renderer while disabling the mesh renderer and mesh collider for just a few frames if a collision occurs over a certain velocity. That part works well, but after the cloth phase ends I want the rendered mesh and mesh collider to change to the newly deformed mesh. All I need is a way to return the mesh from the cloth component, but the only variables that could be of use are the vertices and normals of the cloth. The only mesh variable of the cloth component just references the original, unmodified mesh. I have thoroughly tested this and it is in fact the only part of my script that is failing to work.
This is particularly frustrating because the vertex indices of the vertices in the cloth are different from those in the original mesh. I have already tried looping through the vertices of both to match them up in several ways, but to no avail. Is there any other way to calculate or return the deformed mesh from the cloth component? Perhaps the problem stems from uv seams on the sphere mesh?
Your answer
Follow this Question
Related Questions
How might I measure the total area of a mesh during displacement? 1 Answer
Interactive cloth on mesh 1 Answer
Skinned Cloth Editor Crashs 1 Answer
add verts and tris to interactive cloth 1 Answer
Connecting flatshaded vertices 0 Answers