# How to Projectile reacting to 2D Wind

**URL:** <https://forums.unrealengine.com/t/how-to-projectile-reacting-to-2d-wind/478424>\
**Category:** World Creation\
**Tags:** projectile-movement, force, unreal-engine, Physics, projectile, question, wind\
**Created:** [February 8, 2021, 3:41am UTC](https://forums.unrealengine.com/t/how-to-projectile-reacting-to-2d-wind/478424 "2021-02-08T03:41:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GreenHowitzer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GreenHowitzer](https://forums.unrealengine.com/u/GreenHowitzer)\
**Post date:** [February 8, 2021, 3:41am UTC](https://forums.unrealengine.com/t/how-to-projectile-reacting-to-2d-wind/478424/1 "2021-02-08T03:41:17Z")

</div>

Hello, hope all is well

I’m trying to affect my arrow in flight with a 2D wind effect on a 3D arrow, I’m not worrying too much about up and down just how much the wind affects or pushes on the actor in flight (projectile).

 ![329142-arrowwind.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/c/7dc9a666e1cd07d90571785c4c4a46c00a34eec1.png)

My wind is global and is based on two values materials handle the rest for foliage. Arrows I can’t seem to wrap my head around how to accomplish this. I need to translate 0-360 to a vector -1 left +1 right x wind speed. But I’m not quite sure how to move forward I’m kind of stuck.

Thank you.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 8, 2021, 12:14pm UTC](https://forums.unrealengine.com/t/how-to-projectile-reacting-to-2d-wind/478424/2 "2021-02-08T12:14:42Z")

</div>

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)

 ![329181-firearrow.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/b/65b31d1795c1f59bf82464efb04934bb7291a76f.jpeg)

* * *

- 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

 ![329182-wind.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/2/c42abf48931d7f285a1e02f6084d927f4ae8dd0e.jpeg)

* * *

The projectile is updated like so:

 ![329183-projectile.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/e/4cea9b8ecbc5b54e8b5b8636e31621bd6a5342dd.jpeg)

- 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

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/4/844f3d607e2c79c4f62880fe97e019426931e797.gif)](https://gyazo.com/cb8eaa9fa64f056da7dcb90cea92bac5)

* * *

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 8, 2021, 12:17pm UTC](https://forums.unrealengine.com/t/how-to-projectile-reacting-to-2d-wind/478424/3 "2021-02-08T12:17:13Z")

</div>

If you do not need any of the wind-field-nonsense, you could have it like so instead:

 ![329184-justwind.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/3/d130ed0f89a568250d8ca66bf302b6061a4683fc.jpeg)

and

 ![329183-projectile.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/e/4cea9b8ecbc5b54e8b5b8636e31621bd6a5342dd.jpeg)

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/d/58d98cb32b173c327f0016ca3dc220324cdd629e.gif)](https://gyazo.com/f163fb00d13947084551ff24737d2e9a)

---

<div class="post-metadata">

**Author:** ![GreenHowitzer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GreenHowitzer](https://forums.unrealengine.com/u/GreenHowitzer)\
**Post date:** [February 8, 2021, 7:46pm UTC](https://forums.unrealengine.com/t/how-to-projectile-reacting-to-2d-wind/478424/4 "2021-02-08T19:46:39Z")

</div>

omg wow thank you so very much I have a lot to try out now thank you
