I put up a general info about local/global transforms and some common calculations here:
To your problem:
Positioning the bullet:
You're setting the local translation/origin of the bullet with the global origin of the firepoint. This might work if the bullet is child a parent which has the position (0,0,0).
It is safer to set either
...to set projis position and rotation equal to firepoint) or...
...to just set projis position equal to firepoint. (but not rotation)
If you would want to offset the bullit i.e. 0.5m along the firepoints z-axis then you could use:
proji.global_transform.origin += firepoint.global_transform.basis.z * 0.5
proji.global_transform.origin += firepoint.global_transform.basis.z * -0.5
.. for the other direction.
Be the force with you:
apply_impulse receives two parameters:
-1: An offset in global coordinate space to the rigidbodies origin. So in this case this would probably simply be (0,0,0), or you could use applycentralimpulse() as well.
-2: Is the force/impulse vector in the global coordinates space (so rotation is global).
So applying the impulse would be:
const MY_FORCE = 100
proji.apply_central_impulse(firepoint.global_transform.basis.z * MY_FORCE * -1)
This applies a force of "100" to the bullit (you may use more or less depending on the mass you set on the bullet and how far and fast you want it to go) in the direction of -z of the firepoint. Should the bullet go "backwards" then remove the
* -1 of the line above.