The mechanic you’re talking about is called exactly that: Rotate In Place - You tube has quite a few tutorials on it.
Also, you can use the Lyra Starter game as an example to look at with Rotate in Place code - or the ALS (Advanced Locomotion System) on the marketplace (free section) has all of that too:
There is also a component coming to the marketplace soon that you can easily add to existing characters: