- Home /
How to get a wind effect afecting multiple meshes?
I have a very tall, and thin, tower of cubes one on top of the other, each with a rigidbody attached. I'm trying to build it higher and higher and have a wind blowing at random heights to try to blow it up and demolish it. It seems simple, but I can't do it properly.
I need to do something as the wind zones for tree, and I cannot attach the forces to the cubes since I need something to instantiate randomly at certain times or places that "pushes" the cubes to make them fall.
I've tried with a particle system, but I was unable to make the particles as collider objects (is this even possible?).
Any suggestion?
Answer by MrSoad · Nov 05, 2014 at 12:32 AM
You can create your own wind zone areas using trigger zones. Each trigger can apply a randomly changing force to whatever it is in contact with it via the OnTriggerStay() function.
Make sure you check that the objects inside it that you need to apply a wind force to have rigidbody's attached.
And use "yield WaitForFixedUpdate()" at the top of the OnTriggerStay() function.
Your answer
Follow this Question
Related Questions
Particles and 2D games 1 Answer
Shuriken OnParticledCollision 2 Answers
Detect when 2 particle systems collide with each other? 0 Answers