Actor rotation is reset every tick

My code is simple, I rotate the actor’s Yaw towards either 180 or 0

FRotator actorRot = GetActorRotation();
FRotator res = FMath::RInterpTo(actorRot, FRotator(0, isFacingRight ? 0 : 180, 0), DeltaTime, 20);

However … it’s not working, by debugging I found that at the beginning of every tick, the rotation is reset to 0,0,0.

Well, I found the problem,
In the editor I unchecked “Pawn > Use Controller Rotation Yaw” from the details tab of the instance you created from the class.


Thanks had the same Problem :slight_smile:

Thank you =)

As soon as I didn’t set myself my camera rotation anymore (no more movement or whatever) the camera rotation was reseted at a random value. This fix the issue. Thanks :slight_smile:

Thanks for help!