【发布时间】:2018-05-04 00:42:55
【问题描述】:
我正在使用以下代码来旋转对象并将其设置为可在编辑器中移动。
void URotateMe::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
FRotator rot = Owner->GetTransform().Rotator();
UE_LOG(LogTemp, Warning, TEXT("rotation before : %s"), *rot.ToString());
Owner->GetTransform().SetRotation(FQuat(rot.Add(0, 20, 0)));
rot = Owner->GetTransform().Rotator();
UE_LOG(LogTemp, Warning, TEXT("rotation after : %s"), *rot.ToString());
}
谁能帮我看看我做错了什么,因为我是虚幻引擎的新手。
【问题讨论】:
-
请提供更多细节和上下文。包括你尝试过的。
标签: c++ unreal-engine4