How to make a projectile shoot in the direction your facing

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

2 Likes

There are many ways of doing so. :scroll:

Since you’re using the “Arcade Character Animation” extension, we can use that as a way to determine which direction the player is facing and apply it to its projectile:

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”.

For reference, here’s the game with the new edits.

Hope this helps :pray: Happy coding! :grinning:

3 Likes

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

2 Likes

how do i use dark extension im having trouble

1 Like

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