I have a spaceship which the player can barrel roll using the A and D keys.
A key => -4 TorqueY
D key => +4 TorqueY
This works reasonably well… the spin takes a while to slow down (which I don’t mind because it makes a cool looking attack for the player) although I would prefer if it didn’t stop so often with the spaceship being stuck upside down.
So I decided to make a “stabilise” button, using the S key (between A and S). When this is pressed, the ship is to restore its roll to an upright direction. So far I have worked out I can achieve this with…
S key => Constraint/Orientation of Z axis (up) to direction of Z as 1, and “damp” of 10.
Seems to work pretty well, except that when I use the S button the ship straightens but then continues to spin after I let go of S key. Obviously the TorqueY is still working.
What do I use to neutralise TorqueY?