What can I do to fix the angle of the foot in different character rotations?

In this tutorial, the character rotation does not follow the camera rotation, and it is fixed. I’m trying to do it for an FPS game.