Help writing function to instantly rotate third person character to face thumbstick direction

After a lot of fiddling around I’ve come up with a function that seems to work.