I'm trying to find a method for simulating the effects of wind on various sprites in a 2D scene. Is there a relatively simple technique that I could use to achieve this?
What I have in mind is to give these sprites a "spring" effect that I could hand a force to which would rotate them in a specific direction and eventually degrade the force and bring the sprite back to its "resting" rotation over time with a little bit of rebound/wobble/sway... My Problem is I don't understand how I can mathematically create the elastic/spring effect using rotation and bringing into account things like mass, resistance, or stiffness. How would I go about doing this in code?
This doesn't have to be super realistic in anyway, but I was hoping I could set it up so there is a global wind variable that gets applied to sprites starting at one side of the screen and making its way to the other to look like a gust of wind passed through, which I should be able to accomplish once I have a method for applying a wind force to each sprite...
If anyone has any experience doing something like this or any advice/ideas that you think may be helpful I would greatly appreciate it!!!