# How to make a projectile shoot in the direction your facing

**URL:** <https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488>\
**Category:** Help\
**Tags:** game\
**Created:** [June 27, 2024, 6:49pm UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488 "2024-06-27T18:49:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrispyBac0n](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@ChrispyBac0n](https://forum.makecode.com/u/ChrispyBac0n)\
**Post date:** [June 27, 2024, 6:49pm UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488/1 "2024-06-27T18:49:58Z")

</div>

i want to design a shooting game but my arrows only go in one direction, how do i fix that to where a arrow will travel in the direction that i’m facing

> **[Contributing to Society 1.1](https://arcade.makecode.com/S30266-53651-23913-37023)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![anon30657772](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@anon30657772](https://forum.makecode.com/u/anon30657772)\
**Post date:** [June 28, 2024, 3:33pm UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488/2 "2024-06-28T15:33:45Z")

</div>

There are _many_ ways of doing so. 📜

Since you’re using the “**[Arcade Character Animation](https://arcade.makecode.com/pkg/microsoft/arcade-character-animations)**” extension, we can use that as a way to determine _which_ direction the player is facing and apply it to its projectile:

 ![Projectile facing code](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/9/0990f9e111c6c0e7c951dea76f4dd69b4503c726.png)

There might be a better way of doing it but this is what I can think of for the moment.

> **By the way, I thought I'd warn that you have a bug with your overlap between the projectile and the enemy ...**
>
> > You’re using “mySprite” as the variable to destroy. When using an overlap block, you _almost_ **always** want to use the arguments aka the “sprite” and “othersprite” variables.  
> > In this case, you want to use “_othersprite_” instead of “_mySprite_”. That way, the code works on all enemies not just the enemy called “mySprite”.
> > 
> > - Your code should go from _this_:  
> > ![Old overlap code](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/b/2/b2222e4320742c19ccccb8a635e134b49437f89a.png)
> > - To **this** :  
> > ![New overlap code](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/6/36636eb4d56ecfcab5a556d003b588a48aa23236.png)

_For reference, [**here**](https://arcade.makecode.com/S42027-76006-81598-84238)’s the game with the new edits._

Hope this helps 🙏 **Happy coding!** 😀

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [June 28, 2024, 5:10pm UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488/3 "2024-06-28T17:10:39Z")

</div>

using the dart extension is also a great way to make projectiles

---

<div class="post-metadata">

**Author:** ![gravethecoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gravethecoder/32/17144_2.png) [@gravethecoder](https://forum.makecode.com/u/gravethecoder)\
**Post date:** [November 14, 2024, 11:03pm UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488/4 "2024-11-14T23:03:56Z")

</div>

how do i use dark extension im having trouble

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [November 15, 2024, 12:30am UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488/5 "2024-11-15T00:30:24Z")

</div>

you might need to use sprite util to convert degrees into radians

---

<div class="post-metadata">

**Author:** ![ShayH](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shayh/32/27079_2.png) [@ShayH](https://forum.makecode.com/u/ShayH)\
**Post date:** [December 4, 2025, 6:00pm UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488/6 "2025-12-04T18:00:38Z")

</div>

May be very late but how do you do a cool-down on your projectiles?

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [December 4, 2025, 7:16pm UTC](https://forum.makecode.com/t/how-to-make-a-projectile-shoot-in-the-direction-your-facing/29488/7 "2025-12-04T19:16:08Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/1/f1796347ab24d618bef5f873554a8aabc78652f6.png)  
simplest way is to use the timer exension (in default list)
