UE5 C++ course, FRotator is not printing to log

I have been following the course, last night everything was working, I restarted UE and now the UE_LOG won’t print to the log screen. Here’s my code, and yes I know the GetWorld is commented out, it happened when I put that in so it’s my troubleshooting.

// Called every frame

void UGrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)

{

Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

FRotator MyRotation = GetComponentRotation();

FString RotationString = MyRotation.ToCompactString();

UE_LOG(LogTemp, Display, TEXT("Grabber Rotation: %s"), *RotationString);

//float Time = GetWorld()->TimeSeconds;

//UE_LOG(LogTemp, Display, TEXT("Current Time is: %f"), Time);

}

I think instead of “MyRotation.ToCompactString()”. I think it’s supposed to be just “MyRotation.ToString()” instead. To be fair, I haven’t coded in C++ for Ue5 yet, so it might be different, but try "MyRotation.ToString() instead and see what happens.

Ya nothing :frowning: Don’t want to continue because I have a feeling we will be using this shortly. and if it’s not pushing to the log, then I don’t know what’s going on lol

Nevermind, just to give an update, turns out when I restarted UE, it must not have saved my player correctly and it deleted my Component from the blueprint of the player. wow, been looking at this way too long.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms