Lerp FPScontroller to the same rotation as the camera?

Hi
If you’ve ever played Dead Space than you’ll understand what I want. I want the Y axis (rotation) of my FPSController to lerp to the same Y axis as the MainCamera when you either hold the Horizontal, Vertical, or Aim input. How you’d I do this? If you need an example then here’s some Dead Space Gameplay.

https://www.dailymotion.com/video/xaqoy2

Thanks!!!

P.S. I prefer JavaScript but anything works

for(int i = 0;i<100;i++)
{
    position = i/100*(thing1-thing2) + thing1;
}

if its a smooth animation you want, this might help… otherwise idk what you are really asking, sorry!