Anyhow, i have this turret that is supposed to face the target. I trotates on a fixed base, and i have no idea how to calculate the angle that my hinge must rotate to to face the target, with X and Z in mind. The Y aim of the turret is not important tn.

thanks in advance