How limit view angle (e.g. only be able to look left and right)?

Hey everybody I was wondering if anybody knew how to lock the view angle so the player can only look left and right as I am creating a classic doom style game but using mouse look in ue4.
Basically how doom limited you to only being able to look left and right due to the limitations of technology back then.

I guess you started using the UE4 templates. So in the character blueprint you’ll find sections tagged by inputs. Within the mouse section, just delete the nodes related to the pitch rotation, which will usually looks like this:

-m

ill give it a try