Help me make player movement similar to video i am sharing

I want to have similar player movement tried many things but not getting proper solution. If anyone could help me with player movement script that would be very helpful for me

Since i could not upload video so sharing these images

So basically i want to move player in swipe direction and to also rotate the player according to the movement
Please help me with the script