(FIXED) Bullets keep misfiring

How do I make it so my bullets fire from the player exactly? Whenever I fire them, even though I set them to fire from the player, it keeps firing like 100 pixels away on average, or they fire from the floor. How do I change this? (fires with a keyboard key not mouse on a platformer)

Move the origin point of the bullet object to it’s center.

I do that, but it still fires far away from the player

Can you share a screenshot of your events? A video recording of the problem would help too.

it fires in the floor, even if i’m not in the floor (sorry for the low quality screenshots lmao)

(doesn’t show here, but it spawned at the player’s feet (they weren’t jumping before, that was an accident)

The event looks fine to me. Couple of things to check:

1- Did you move the center point on the Player object, or is it still at default values?
2- Is the player on another layer (not Base layer)?
3- Did you add any behaviors to the Fireball object?
4- Are there other actions for the Fireball that are not shown in the screenshot?

you can move the center point? maybe that’s what i’m missing

The center point by default is at the center of the object. So I was checking if you moved it to the Player’s feet, hence the bullets are appearing at the feet.

While jumping, where does the bullets appear when shooting?

Unable to test it now, but I’m pretty sure the center point is the issue. Is there any way to change it?

Click the edit icon next to the coordinates, then you can change it.

Would you mind showing a screenshot where that is? I am very unfamiliar with gdevelop

https://wiki.gdevelop.io/gdevelop5/objects/sprite/edit-points/#editing-the-default-origin-and-center-points

I did that, but nothing changed, in fact, it somehow got worse

Screenshot 2024-04-11 175915
(my character also keeps bouncing on the platform, but that’s a different problem)

nevermind, I found the problem! It turns out the bullet was 64 px tall, so I just changed it to 16 and now it works completely