How do I choose the Rotation of an Auto Aim Turret using ballistic trajectory and the muzzle as starting point?

I’m currently working on a school project and I want to shoot a projectile from a auto-aiming spherical turret with a muzzle at a target.
I already got the right formulas for the trajectory from the center of the turret to the target and it’s working fine so far. The Turret’s (and therefore the muzzle’s) rotation is set to match the initial velocity of the projectile.

But it still looks wrong, because the projectile is not released from the muzzle. Instead it comes out from under the barrel and of course it gets worse when the trajectory is higher.

What I want to do is set the muzzle as the origin of the projectile trajectory, so that the rotation of the turret/muzzle aligns with the initial velocity of the projectile. The Rotation should not be constrained in any way and the speed of the bullet should be fixed. I don’t use air resistance yet, so acceleration and deceleration can be ignored.

Sorry for the beautiful Paint image:

So how can I get the right turret rotation and therefore the muzzle position?
Has anyone encountered this problem? Can anyone help me please?

You need to make the bullet child of the muzzle. This way it will move together.

Don’t use the center of the turret as the starting point, use the position of the muzzle’s tip or end of the barrel’s position (where the projectile comes out). The starting trajectory of the projectile should be the same trajectory of the barrel so when the projectile comes out, it is straight out of the barrel and will fall. This should make it look realistic.