How can do this, for example, a car is going up, and then if you swipe to the left or the right the car would rotate left or right and then change the direction according to its rotation(the car is always moving up).
You can use swipe control. Add two advanced movements to your character with the event "swipe left" and "swipe right".