How do can I make a bullet fired from my character facing the moving direction?

I am trying to develop a Smash-TV like topdown shooter.
How do can I make a bullet fired from my character facing the moving direction?
I want the bullet takes the exact direction of movement of my main character sprite, or, at least, one of the main eight directions (maybe this last one is more difficult to obtain).

What is the actual result

I have no idea how to do it…

Related screenshots

here’s the actual conditions (I am at the very beginning). They are perfect for the actual character moving. Please note my character musy only face left or right for a my personal choice (I do not want to design a character viewed from the top and facing 8 different directions).

1 Like

Hi, I just have one question are you pressing a button to fire or is it automatic.

1 Like

I want to press a button to fire.

1 Like

Ok cool give me a sec

1 Like

Ok so I think this should work for left and right shooting:



For up and down shooting you can do the same thing but with the angles:
90 for up and 270 for down.

3 Likes

I will try to implement it in my project now. I will post my implementation of all the main 8 angles as soon as possible. Manu Many Thanks!

2 Likes

Hi Flidude! I have solved in this alternative, very functional way:

Thanks for let me know about the existence of “FIRE” behavior in the Assets section, immensely useful!

Bye!

1 Like

Glad I could help in some way

1 Like

My Solution: If you are using the bullet fire extension, double click on the object, go to behavior, expand the FireBullet section, and put a checkmark on “Rotate Bullet to match trajectory”. Every time the bullet fires, it will face toward the direction it is fired.

1 Like

I’m kind of new to Gdevelop5 and this will really help me!

It didn’t work for me. :frowning: