Many ways to do it, here’s one:
- below, the character fires arrows in a pretty standard way
- if the projectiles are to be affected by gravity, the firing angle can be set up by rotating the vector
- the below also accounts for the character movement vector (as in, you run forward and fire an arrow, the arrow will fly faster - relativity)
- an actor with a box collision represents wind (for something more nuanced, there are vector fields)
- when an arrow enters this field, it receives a wind modifier; when it leaves, the wind modifier is taken away
- this way there can be multiple wind effects at once and they will accumulate if overlapping
- since vectors have both direction and magnitude, you only need a single variable here
The projectile is updated like so:
- accounting for framerate, we accumulate the movement vector and update arrow’s velocity
- you can disable Rotation Follows Velocity on the Projectile Movement if needed