[Solved] Bullets not firing from exact point

Right now I’m developing a top down shooter game. I’ve made a point on my character titled “gun”, and whenever you click the left mouse button, bullets are supposed to come from the point. I’m just making it work right now, so the placeholder sprite just spits bullets from his head at the moment. The problem is, whenever they turn, the bullets will spawn from different points, switching from the players right and left arm depending on where they’re aiming. How do I get the bullets to spawn from a specific point?

A few things here:

  • Make sure your bullet art/animation is created so that the bullet object is facing right. That is the 0 degree angle, and will make it look correct when rotating.
  • Additionally, after ensuring your bullet is set up so it’s facing to the right in the animation, make sure your origin point on your bullet is at the left most center of the image file. You can see an example of this in the “Shoot Bullets” example on this page: https://gdevelop-app.com/game-examples-starters/
1 Like

I was originally going to add more images to help illustrate what’s going on better, but last night when I was trying to upload them in the replies, my internet bugged out. I just got it fixed today, apologies for the late replies

Example of how shooting in game looks

Sorry for the fuzzy quality on these screenshots, I used OBS to record myself playing so I could screenshot different frames

I took your advice, and I ended up having to place the point of origin right in the center of the sprite, and it works perfectly! Thank you for your help :D‎

1 Like