GetActorLocation() always return same values

I have a simple world with empty actor.
I move the actor in the world and print the current loaction and rotation.
The location seems right but the rotation is never changed (0,178,0).

My code:

FVector location = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorLocation();
FRotator rotation = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorRotation();  

What am I missing?

that was the problem!
thanks!

Does your pawn have “Use Controller Yaw” set to true?

Converted comment to answer so you can mark this as resolved.