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…
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).
Hi, I just have one question are you pressing a button to fire or is it automatic.
I want to press a button to fire.
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.
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!
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!
Glad I could help in some way
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.
I’m kind of new to Gdevelop5 and this will really help me!