I'm trying to make a stunt game where vehicle will jump from ramps but unfortunately it keeps leaning forward when in air which makes bad landing I have struggled but can't stop it from doing this. I'm using RCC V3 for car.
vehicle.transform.rotation = Quaternion.Lerp(vehicle.transform.rotation, Quaternion.Euler(-5f, vehicle.transform.rotation.y, vehicle.transform.rotation.z), Time.deltaTime * 2f);
I have used this line of code which stops it from leaning forward but vehicle.transform.rotation.y this doesn't working properly which makes the car to rotate 180 degree on y axis.
can anyone please help me with it?