- Home /
How to get positions of points on a cloth mesh which has a cloth component in runtime
I am doing cloth simulation in unity. I have a cloth 'game object' which attached a cloth mesh. I added "cloth" component on it so that it interacts with colliders attached to it. My goal is to get the positions of vertices around the armhole in run time while the cloth moves and deforms. I write a script attached to my cloth object to get these positions, bu my problem is that when I use following scripts,
I find that the position I get is static even the cloth is moving around and deforming. More specificly, I drew lines between three of the vertices using "Debug.DrawLine" but the lines doesn't move at all even when the cloth is deforming and moving, so I guess that I didn't get these positions during runtime.
Anyone can tell me how I can get vertex positions on a moving cloth?
Your answer
Follow this Question
Related Questions
Is Cloth component's overhead affordable for mobile MMOs,if added to many characters in scene? 1 Answer
InteractiveCloth & ClothRenderer pauseWhenNotVisible issue 0 Answers
Unity cloth stops moving (simulating) after a short time? 0 Answers
"value must be greater than 0" - (Filename: Dynamics3/Cloth.cpp Line: 701) 1 Answer
Cloth Doesn't Move. 0 Answers