- Home /
How do you make a flag blow in wind (Unity5)
I was wondering how you make a flag move in the wind in unity 5. I have the pole, flag and texture. I just can't figure out to make it work. Obviously the flag needs to stay in place and the flag needs to ripple.
So far I have these components: Mesh filter, skinned mesh renderer and cloth.
Answer by CoolCasualCat · Oct 19, 2015 at 10:07 AM
In the cloth component, there is a global acceleration. The global acceleration has 3 modifiable values for each axis (x,y,z). You could, for example, make the x global acceleration any value high enough (either negative or positive) and then the flag would start looking like it was pulled by the wind. The rippling of the flag could be simulated by creating a script that would access the global acceleration, and then you and use Random.Range to create a fluctuation of the y acceleration.
Your answer
![](https://koobas.hobune.stream/wayback/20220613191621im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity cloth stops moving (simulating) after a short time? 0 Answers
Cloth Renderer's shading 0 Answers
Skinned Cloth Editor Crashs 1 Answer
How to attach a cloth to TPS character 0 Answers
how to make high detailed cloth ??? 1 Answer