本文整理汇总了C++中FRotator::ToString方法的典型用法代码示例。如果您正苦于以下问题:C++ FRotator::ToString方法的具体用法?C++ FRotator::ToString怎么用?C++ FRotator::ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FRotator
的用法示例。
在下文中一共展示了FRotator::ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoTrace
void APawnWithCamera::DoTrace()
{
FVector Loc = CameraOne->GetActorLocation();
UE_LOG(LogClass, Error, TEXT("Loc is %s"), *Loc.ToString());
FRotator Rot = CameraOne->GetActorRotation();
UE_LOG(LogClass, Error, TEXT("Rot is %s"), *Rot.ToString());
FVector Start = Loc;
UE_LOG(LogClass, Error, TEXT("Start is %s"), *Start.ToString());
FVector End = Loc + (Rot.Vector() * Distance);
UE_LOG(LogClass, Error, TEXT("End is %s"), *End.ToString());
TempActor->SetActorLocation(End);
FCollisionQueryParams TraceParam = FCollisionQueryParams(FName(TEXT("Trace")), true, this);
TraceParam.bTraceComplex = true;
TraceParam.bTraceAsyncScene = true;
TraceParam.bReturnPhysicalMaterial = false;
TraceParam.AddIgnoredActor(this);
FHitResult Hit(ForceInit);
GetWorld()->LineTraceSingle(Hit, Start, End, ECC_Pawn, TraceParam);
DrawDebugLine(GetWorld(), Start, End, FColor(255, 0, 0), false, -1, 0, 12.33f);
if (Hit.bBlockingHit)
{
UE_LOG(LogClass, Error, TEXT("Hit Something"));
}
else
{
UE_LOG(LogClass, Error, TEXT("No Hit"));
}
}
示例2: BuildString_Rotator
FString UKismetStringLibrary::BuildString_Rotator(const FString& AppendTo, const FString& Prefix, FRotator InRot, const FString& Suffix)
{
// faster, preallocating method
FString const RotStr = InRot.ToString();
FString StringResult;
StringResult.Empty(AppendTo.Len()+Prefix.Len()+RotStr.Len()+Suffix.Len()+1); // adding one for the string terminator
StringResult += AppendTo;
StringResult += Prefix;
StringResult += RotStr;
StringResult += Suffix;
return StringResult;
}
示例3: BugItWorker
void UCheatManager::BugItWorker( FVector TheLocation, FRotator TheRotation )
{
UE_LOG(LogCheatManager, Log, TEXT("BugItGo to: %s %s"), *TheLocation.ToString(), *TheRotation.ToString() );
Ghost();
APlayerController* const MyPlayerController = GetOuterAPlayerController();
if (MyPlayerController->GetPawn())
{
MyPlayerController->GetPawn()->TeleportTo( TheLocation, TheRotation );
MyPlayerController->GetPawn()->FaceRotation( TheRotation, 0.0f );
}
MyPlayerController->SetControlRotation(TheRotation);
}
示例4: Conv_RotatorToString
FString UKismetStringLibrary::Conv_RotatorToString(FRotator InRot)
{
return InRot.ToString();
}
示例5: BugItStringCreator
void UCheatManager::BugItStringCreator( FVector ViewLocation, FRotator ViewRotation, FString& GoString, FString& LocString )
{
GoString = FString::Printf(TEXT("BugItGo %f %f %f %f %f %f"), ViewLocation.X, ViewLocation.Y, ViewLocation.Z, ViewRotation.Pitch, ViewRotation.Yaw, ViewRotation.Roll);
UE_LOG(LogCheatManager, Log, TEXT("%s"), *GoString);
LocString = FString::Printf(TEXT("?BugLoc=%s?BugRot=%s"), *ViewLocation.ToString(), *ViewRotation.ToString());
UE_LOG(LogCheatManager, Log, TEXT("%s"), *LocString);
}
示例6: FaceRotation
void APawn::FaceRotation(FRotator NewControlRotation, float DeltaTime)
{
// Only if we actually are going to use any component of rotation.
if (bUseControllerRotationPitch || bUseControllerRotationYaw || bUseControllerRotationRoll)
{
const FRotator CurrentRotation = GetActorRotation();
if (!bUseControllerRotationPitch)
{
NewControlRotation.Pitch = CurrentRotation.Pitch;
}
if (!bUseControllerRotationYaw)
{
NewControlRotation.Yaw = CurrentRotation.Yaw;
}
if (!bUseControllerRotationRoll)
{
NewControlRotation.Roll = CurrentRotation.Roll;
}
#if ENABLE_NAN_DIAGNOSTIC
if (NewControlRotation.ContainsNaN())
{
logOrEnsureNanError(TEXT("APawn::FaceRotation about to apply NaN-containing rotation to actor! New:(%s), Current:(%s)"), *NewControlRotation.ToString(), *CurrentRotation.ToString());
}
#endif
SetActorRotation(NewControlRotation);
}
}
示例7: convert
inline FString convert(FRotator x)
{
return x.ToString();
}