Third peson character control with logic nodes

The best way i found to limit vertical rotation is by using the Math node with ‘modulo’. You just have to put the rotation value in a Math modulo node with the limit value in radians. Modulo will keep the value inside the limit range. For example if you put the value input in a 2.5 modulo, the value will always be between -2.5 and 2.5.

To set the player rotation according to the camera there is various ways, the easier is to add the camera rotation to the player.

If you need more context or a .blend, i will try to explain better