How can I make my character to walk like GTA

I want it to rotate so it faces the exact direction that I tell it to go with
using the keyboard and with the axis of my joystick for example I press left it start walking to left and faces that direction and then if I press right it rotate the most narrow path to face that direction

any help would be apriciated

thanks in advance

using python get from the camera it’s orientation, particularly it’s -y axis [the direction you’re viewing] [negative of second row? I forget now]

now, you’ll want the character’s left axis dotted with the camera’s forward axis to reach zero. This will mean that either the character points directly at the camera or away from it.

so you’ll also need logic to rotate the correct direction, which isn’t very complicated [I think I’d use the sign of the dot of the forward vector and camera’s forward vector to tell]. You’ll also need to do all of this in python.

the annoying part that I see would be gettting the rotation of the character to accelerate/decelerate as it does in such control setups. this might not be necescary though, and it could just be something I was imagining

well sense Im not that good with python could someone give me some links where you could learn python