How to get velocity in a given direction?

I am making a flight simulator. It contains a rigid-body with mass 800 and drag 0.05(as it is an airplane it is sleek). My plane goes forward with no problems but when it turns it keeps drifting sideways. I want to get the velocity of the aircraft in the x axis (Side axis of the aircraft) so that I can add relative force to stop it from drifting. What I am getting by: rigidbody.velocity.x is the velocity of the aircraft in the world x axis. I want it in the Aircraft’s x axis. Please help.

Hi, you can use transform.InverseTransformDirection( vector3 ) to transform a world space vector to the object’s local space. And just a reminder, always modify physics related values during FixedUpdate() :slight_smile: