I have the code below to set Physics Thruster Components to the Location/Rotation of an Arrow Component once the ship is loaded in, but when it loads instead of the thruster Rotation being -90 degrees, it’s 89.999992 degrees (log picture is attached). If I try to offset it manually with code by setting the rotation to 90.000008, then it sets it to that. I can’t seem to get it to go to exactly 90 degrees, unless I set it in the editor manually, which is what i’m trying to avoid doing.
void AFIPlayerShip::BeginPlay()
{
Super::BeginPlay();
MyPlayerController = Cast<AFIPlayerController>(GetController());
checkf(MyPlayerController != nullptr, TEXT("There is no FIPlayerController attached to player ship: %s"), *GetName());
CameraDistance = CameraBoom->TargetArmLength;
// SET THRUSTERS TO GUIDE POSITIONS
ForeYawThruster->SetRelativeLocationAndRotation(ForeYawThrusterGuide->RelativeLocation, ForeYawThrusterGuide->RelativeRotation);
AftYawThruster->SetRelativeLocationAndRotation(AftYawThrusterGuide->RelativeLocation, ForeYawThrusterGuide->RelativeRotation);
UE_LOG(LogTemp, Warning, TEXT("Fore Thruster Loc/Rot %s, %s"), *ForeYawThruster->RelativeLocation.ToString(), *ForeYawThruster->RelativeRotation.ToString());
UE_LOG(LogTemp, Warning, TEXT("Fore Arrow Loc/Rot %s, %s"), *ForeYawThrusterGuide->RelativeLocation.ToString(), *ForeYawThrusterGuide->RelativeRotation.ToString());
}