Having a problem with rotations (again)

If you want that to return 0 - 360, just change it as such:


//Returns the angle on the bow
float UBPFuncLib_TDChelper::AngleOnBow(APawn* TargetShip, APawn* PlyrShip)
{
	FVector LineSight = (PlyrShip->GetActorLocation() - TargetShip->GetActorLocation());
	LineSight.Normalize();
	float BowAngleInDeg = FMath::RadiansToDegrees(FGenericPlatformMath::Acos(FVector::DotProduct(TargetShip->GetActorForwardVector(), LineSight)));
	
	if (FVector::DotProduct(TargetShip->GetActorRightVector(), LineSight) < 0.0f) // We need one more dot product to actually figure out our winding
	{
		return 360.0f - BowAngleInDeg;
	}

       return BowAngleInDeg;	
}