I had a class derived from APawn, in its ::Tick(float d) there’s been something like this:
FRotator Ang = GetActorRotation();
FRotator RelativeRotation = FRotator(0.0f,30.0f,0.0f);
SetActorRotation(FRotator(0, Ang.Yaw + RelativeRotation.Yaw, 0));
And it has been working fine, the pawn has been turning as it was meant to.
But then I changed the class so it is now derived from ACharacter instead of APawn and everything stopped to work: the Pawn didn’t want to spin further than 30 degrees.
Debug messages have shown me that Ang.Yaw is always zero.
The desription of the GetActorRotation function says it returns the rotation of RootComponent so I guess the problem is this, but can’t figure out what exactly I am doing wrong. Somehow that means that when I actually turn the character its RootComponent is remains still.