I have a spaceship onscreen and the arrow keys make it dive down and glide up, or move to the left and the right, and rotate in that direction too. What I can’t figure out is how to make it so hat when you release all keys to make your ship drift back to the middle of the screen and assume its normal rotation. Thanks for millions. n_-
-Moldyorma
I know I know I know! Use a Spring Joint!!
http://unity3d.com/Documentation/Components/class-SpringJoint.html
Just crank up the spring value when all keys are released, and lower the value when the keys are pressed.
That’s not going to work if the ship is kinematic though (which I’m assuming it is). I’d probably just lerp the position and rotation back to the neutral position if no keys are pressed.
–Eric