hi, you should have an empty object with the z axis at the tip of the gun, ensure the object is a child of the gun aswell and then when you aim at the enemy, use the "look at" action for that empty game object to your target.
this way you would have the z axis pointing at the target, ensuring you get a perfect shot!