Changing the angle will involve vector calculations or trig unless your drops are round.
In the case of round drops you the drop angle doesn’t need to align to the angle of motion (vice versa really).
Changing the angle will involve vector calculations or trig unless your drops are round.
In the case of round drops you the drop angle doesn’t need to align to the angle of motion (vice versa really).
At the moment I have modified some deprecated code to produce rain effect from
https://github.com/vsergeyev/Rain/tree/master/Rain
It is pretty good, the rain is striking at an angle. Although I need to increase the density of rain.
Image link : https://goo.gl/QvH1rn
You could also consider using particles. They are quite lightweight, easy to use and may prove more visually pleasing. You can read about particles for Corona at https://docs.coronalabs.com/api/library/display/newEmitter.html.
There are several different ways of creating particles for Corona projects. One easy method is using a free tool available at http://particle2dx.com/. Check the templates and select snow rain. You can then change the shape of the particle to a rectangle and tweak around with the other settings so that it better fits actual rain.
Out of curiousity, I just quickly tried out http://particle2dx.com/, and I tell you what, the snow effect looks excellent!
I also added corona code so that it uses the snow effect on game, and looks fantastic.
Thanks for the free tool!
I will try to tweak it so that it looks like rain, wonderful!
Adding this to my notes
Everyday is a learning day for me in corona, I am learning bits and pieces everyday. The particle effect and rain examples are awesome. Thanks everyone for the help. I am marking this thread as resolved.
I’m glad you like it.
To turn it into rain, all you really need to do is to select the rain snow template again, then go to “Color&Shape” tab and select the line shape (3rd from the right). Finally, adjust the “spin” sliders in both start and end segments to 110. This’ll provide you with a basic rain setup.
The best part about using particles in Corona is that you can also tweak them on the go in game, which means that you can adjust the speed, amount, size, direction, colour etc. of the rain with ease.
Tried as you suggested, looks much better than what I did earlier and also not much of coding to do…
Good to hear!
Thanks…