Why does UKismetMathLibrary::MakeRotator work when making something move relative to controller but definig a rotator like "FRotator rotator=FRotator(0,0,GetControlRotation.Yaw" doesn't?

Hello, I was recently trying to make a character controller in C++ move relative to the controllers rotation. I tried to make the rotator by making a rotator value normally, but that didn’t work, but when using UKismetMathLibrary::MakeRotator it did work. I want to ask what are the inner machinations of this function that make it behave in the way I want to?

It shouldn’t matter. According to the docs, however, the order of rotation variables is different with FRotator. It should be pitch, yaw, roll. In your function call you have yaw last.

FRotator | Unreal Engine Documentation

MakeRotator uses roll, pitch, yaw.

UKismetMathLibrary::MakeRotator | Unreal Engine Documentation