Hello,
How can I create a wind zone, where the wind is affecting the player, and the wind is stronger at the point of origin?
I would like it to be something like this:
Hello,
How can I create a wind zone, where the wind is affecting the player, and the wind is stronger at the point of origin?
I would like it to be something like this:
Wind is just a force. You’ll need to perturb (wobble) it a bit, perhaps using a Perlin noise function. To have the strength be different at different locations, factor the distance into the calculation.
Have your wind zone script scan the scene for targets (eg. using Physics.OverlapSphere), then each FixedUpdate, apply a force (AddForce or even an AddForceAtPosition randomly slightly offset from the centerOfMass).
Hopefully there are enough keywords above that you can assemble this yourself. Alternatively there may be a pre-canned script with enough parameters.
As an artistic tip, I’d recommend some visual feedback too. For example, have some snow or dust that is similarly affected, so the player gets a visual cue.
On the audio side, adjust the pitch of a basic wind loop (eg. this one I made), higher pitch for faster wind (especially if the wind varies in speed, but even if it doesn’t).