Character movement system

Hello there! I want to do movement system like in the last of us. I mean, when I press the d button, the character is walking sideways, the same is when he walks back and to the left. But at the same time, when the character moves forward, he moves in the direction of the camera. I have been trying to solve this difficult problem for me for a long time.

P.S. sorry for not very good english. I wrote with the help of google translator