How to use movement to control camera as well?

I am working on a project where I need the right joystick free for the targeting system and so l have my left joystick controlling the character movement with a lag on the camera always facing in the direction of the character movement.

Ideally if I hold “A” or pushing left joystick to the left, my character should run left while being followed by the camera panning around the player to match the direction the character is facing and that would result in the character going in circles but instead the character just turns left and runs straight even when the camera is facing forward.

I hope this makes sense and someone can help me.