How to check and turn a corner while wall hugging?

Apply the root rotation on the overall graph instead of inside a state machine.

And make sure you are using the correct unit. Radians, not degrees probably.