Hello i m stuck in problem can u help? i m falling two umbrella from tower , and at that time wind is flow from x dirct ,now i m trying in umbrella there are twotype force post and it move randomly just like real effect .can u suggest.
you can try simulating wind with PerlinNoise.
I’m writing some example code down, but you really need to play with the numbers, so the wind looks good on your scale:
void FixedUpdate()
{
Vector3 windDirection = Vector3.left;
float windMin = 10f;
float windMax = 30f;
float windFrequency = 0.1f;
float currentWindForce = windMin + (windMax-windMin)*Mathf.PerlinNoise(Time.time*windFrequency,0);
rigidBody.AddForce(currentWindForce * windDirection );
}
Also add some drag on your rigidBody, so the objects don’t increase speed indefinitely