FVector to FRotator
FRotator FVector::Rotation() const
{
return ToOrientationRotator();
}
FRotator to FVector
CORE_API FVector FRotator::Vector() const
{
float CP, SP, CY, SY;
FMath::SinCos( &SP, &CP, FMath::DegreesToRadians(Pitch) );
FMath::SinCos( &SY, &CY, FMath::DegreesToRadians(Yaw) );
FVector V = FVector( CP*CY, CP*SY, SP );
return V;
}
网友评论