I have exactly problem, all tutorials I found are use “Find Look at Rotation” and “SetWorldRotation” which is only suitable for turret with zero angle on all axis.
Sorry in advance for not posting pictures due to lack of access to the editor.
Try the following:
Inverse transform direction
Get turret actor transform → transform output->
Look at rotation->getXVecor->direction
output->make rotation from x-> set component space rotationot.