Hello, I'm rather new to 3d movement, so sorry if this is an easy fix. I tried to make it so that the character would gradually turn while changing directions, Ex: Moving from South to going West would turn your character at 10 degrees per tick. I did this by seeing if the character was facing less than 0 degrees or greater than 0 degrees, and adding or subtracting degrees if necessary.
The problem was, that to successfully do the method I was doing, it didn't allow for diagonal movement, and to have the character turn towards the past of least resistance I would have to get super convoluted in my coding. Eventually, the code would also get off and stop not on 0, 90, 180, or -90.
Any help is appreciated, thanks!

you might want to include actual code with further commentary on what is what in there.

    So Basically, it moves you, and then if you're less an 90 degrees, but greater than or equal to -90 degrees, it adds degrees for however long you hold it. If you're greater than 90 degrees, but less than -90 degrees, it subtracts degrees in the same way.

    Basically, all I need is something that will gradually turn him to a specific degree, whilst taking the past of least resistance.