[API Noob] How to calculate a relative angle in CPP/UE4

This should be doable, I’ll use the names you have in your image.


FVector LineOfSight = SubmarinePosition - TargetPosition;
float BowAngleInDegrees = FMath::RadiansToDegrees(Acos(FVector::DotProduct(Target.Forward, LineOfSight))); // Dot product describes the angle between Target and LineOfSight, taking the Arc Cosine gives you the actual angel in radians (0 - 2PI), we then convert that to degrees.
if (FVector::DotProduct(Target.Right, LineOfSight) < 0.0f) // We need one more dot product to actually figure out our winding
{
    BowAngleInDegrees *= -1;
}

That should give you a relative turning angle in degrees.