In my game there is a player and its arm with a gun. This arm is independent from the player, so it can be rotating with the mouse. I would like that the bullets create at the front of the gun.
The trick is that the origin of this armed gun at its right end, not the left where the player look. I would like create the bullets away from this origin to the width of the sprite of the gun.
Here is my code:
if (Input.is_mouse_button_pressed(BUTTON_LEFT) and can_shoot==true):
b.position=position #This should be supplemented with offset by the width of the sprite