Move player on x axis with walking but not turning

I’m trying to understand how the player controller works and wanted to try and modify the default 3rd person character so he walks left and right by pressing A and D, and into the foreground and background by pressing W and S. (Like in games like Final Fight, Castle Crashers, Double Dragon and so on)

I deleted some stuff like the touch and mouse input, which already makes him only move left and right, so that’s good.

But now I’m wondering how I can make him move back and forth into the background and foreground, with the character still playing the walk animation, but not looking in the direction. (Because in these kind of games, the player is always either facing left or right).

Would be cool if someone could give me heads up.