Creating a sprint that has turning restriction?

I’m currently trying to build a sprint that restricts turning left and right by a little so that the character can bank to the left or right direction wise, almost a drift in a way. I’m building it in c++ but all I really need is a pseudo code approach, an idea or some form of execution for me to attempt.

right now my approach is, I turn up the max walk speed when you sprint. so I’m trying to think of how to prevent the player from turning fully and it causes the character to bank until fully right or left, and from right and left to up or down.

Apply another scaling factor to the “addControllerYawInput” (or whatever its called) that decreases the axis value output of your input by a certain percentage when “bIsSprinting” (a multiplier of 0.25 to start maybe?)

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.