There is an easier way, based on speed or speedMode (if you have that kind of variable in your setup) use the RotationRate attribute:
Heres a snipped form the Doc for UCharacterMovementComponent:
Type: Name: Description
FRotator | RotationRate | Change in rotation per second, used when UseControllerDesiredRotation or OrientRotationToMovement are true.