How do I make an object rotate properly when holding down keys?

My goal is to make a plane which rolls left and right when A or D is held down, and tilt up and down when W or S is held.

I used torque to rotate the plane however when I let go of the key the plane continues to rotate.

I’ve tried creating a counter torque to stop the plane from rotating however I dont know the exact amount of torque I need to completely stop the plane from rotating.

How do I go about solving this? Are there better ways of achieving my goal other than using torque?

You could always set the angular velocity directly instead of messing with torques.

If you do want to mess with torques for some reason:

I guess you could do that, but have the torque applied be proportional to the angular velocity every physics step. Tune the proportion until it feels right and doesn’t over correct. That would probably give you a rough approximation of real air physics.

2 Likes