2 Direction to one direction

Hello I have a problem and cannot continue.

I have a spaceship. I use a OrbitCam to shoot to the direction where I am looking at with my camera.
The Problem: It’s thirdperson. So the cannons are lower than the camera on the y-axis.
It means the direction alone of camera do not working. So I had new method:

		Vector3 offset = transform.InverseTransformPoint(transform.root.position);
		
		RaycastHit hit; 
		if(Physics.Raycast(Camera.main.transform.position, Camera.main.transform.forward, out hit, 165)) {

			Vector3 dir = (hit.point - transform.root.position).normalized;
			Targetpos = dir;
		} else {
			Targetpos = (Camera.main.transform.position + Camera.main.transform.forward*500 - transform.TransformDirection(offset.x, 0, 0)) - transform.position;
		}

So this still let me aim to “forward” direction where I am pointing.
The problem is I want to remove Raycast. This “autoaim” isn’t my goal.

The problem is just (if I remove raycast) if a object is far enough maybe I hit him when my crosshair is on him, otherwise my bullets flys under the object because (like I said) my cam is way higher and the cannons (or my ship itself) is lower.

I will show it with pic:


First part of pic is what does work. But next part you see the object is next to me and the direction doesn’t work anymore.
I don’t know how to fix this :(.

The problem with crosshairs is that they don’t account for distance, so if you have guns not precisely where the camera is, then it won’t work. In a couple of fps projects and a third person project I had been working on, I used a raycasts to auto adjust the angle of aiming for the guns, so a raycast would shoot out straight forward from the camera, and if it hit something, then the angle the bullets flew out would be adjusted so they flew toward that raycast hit. Then you just add recoil or some inaccuracy with random numbers to it so that it isn’t perfectly accurate with every shot. Don’t know if that’s kinda what your looking for but that’s what I’ve found to work.