Third peson character control with logic nodes

I just checked the “Restrict vertical” box, and put in -0.500 and 0.500. But regarding the rotation of the character, the Blend file is probably better.