Orient Rotation only on forward

Yeah basically.

I want to rotate the camera around the character freely, as it is in the third person template. So when I watch at my character from the front view, I want him to turn around as soon as I press W. But If I press A or D I want him not to rotate, so I can strafe