How do i make my character rotate when falling?

I want to transmit air resistanse sense in my game, not only gravity.

So, when character is falling - it is not just falling down, but gliding the air.
I want to rotate my character up to 90 degrees down when it is falling and back when player adds some force to go glide up & forward. Please see image attached as example.

My idea is to use “falling” speed to calculate rotation angle, but i am not sure it is correct way to do that. What is the correct way to achieve that?


P.S. Sorry, yes, of course is use rigidBody2d.

You don’t give a lot of details about your situation. Assuming you are using a Rigidbody, an easy solution is to have your character’s rotation follow the velocity:

var dir = rigidbody.velocity;
if (dir !=
transform.rotation = Quaternion.LookRotation(dir);

The code is a bit different for 2D, but the concept is the same.