Okay, also lerne ich gerade eine Unreal Engine programming tutorial. Hier ist der Code Ich bin verwirrt mit:Unreal Engine Anfänger FMath :: Sin
void AFloatingActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
FVector NewLocation = GetActorLocation();
float DeltaHeight = (FMath::Sin(RunningTime + DeltaTime) - FMath::Sin(RunningTime));
NewLocation.Z += DeltaHeight * 20.0f; // Scale our height by a factor of 20
RunningTime += DeltaTime;
SetActorLocation(NewLocation);
}
Ich verstehe nicht, den Teil, wo es heißt dies:
void AFloatingActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
und dieser Teil:
float DeltaHeight = (FMath::Sin(RunningTime + DeltaTime) - FMath::Sin(RunningTime));
NewLocation.Z += DeltaHeight * 20.0f; // Scale our height by a factor of 20
Was sie tut, machen? Wie macht es das? Was ist FMath :: Sünde? Es ist so verwirrend.
Das war's! Danke für deine Zeit (und hoffentlich, Hilfe)!
"* Ich verstehe nicht *" ist keine gute Beschreibung dessen, was das Problem ist. Das könnte alles bedeuten, C++ nicht zu verstehen, nicht zu verstehen, was '::', usw. – PaulMcKenzie