The rotating head and rotating in place from the first person

How to implement a player that will rotate the head (when turning the camera) and perform a turn in place (if the camera rotation = 60 degrees)? Spent two days looking for tutorials but never found anything

Illustrative example - UE4 - Advanced Locomotion System V1 - Features - YouTube (2:08)