Rotate a particle

Hi, I’m new in Unity and I’m making a rain simulator.

For that I’m using a particle system with stretched particles. We also need to simulate the influence of wind in the stretched particles. As the particles are not spherical, applying oblique velocities yields to unrealistic visuals. What we need is to rotate the individual particles to the direction of wind.

Is there a way to rotate individual particles?

As far as I know, there is no way to work with each particle :frowning:

I’m not sure what you mean by “rotate . . . to the direction of wind,” but you can control individual particles’ position and velocity with ParticleEmitter.particles. If you want to see a good example of scripting particles, check out the Lightning Bolt demo in the Procedural Examples project.

Burnumd: by rotate a particle I mean: “not drawn in the same direction as the corresponding texture”. Each rendered particle is aligned to the screen monitor printed in front of the camera. Follows what I’m having and what I want to achieve (the second image is built from the first using photoshop) In the second image ALL particles are equally rotated. I need a global rotation over all particles an emitter is emitting.

thanks for the help

193811--6903--$lluvia_2_765.jpg
193811--6904--$lluvia_rotada_489.jpg

Rotate the particle emitter; that’s what I do anyway. (See results here…wind changes the direction of the rain over time. It’s a bit subtle, but if you stand still you can see it.)

–Eric

Thank you Erich. I have found the problem. I was using billboard particles and that invalidates any rotation. Using stretched particles rotates them with the direction of the vector velocities as I needed. No need to rotate the emmiter for that, then. Anyhow rotating the emmiter is a comfortable way to change the direction of the partilces keeping the speed constant. Setting the direction using speed vectors modifies the module of the speed which is inconvenient. Thanks for the help.

Btw: I’m using rain streaks form CAVE | Projects: Photorealistic Rendering of Rain Streaks

which gives a much more realistic effect than stretching the default particle. You can download the image database from the link