Hi all!
It’s always good to be back here for some great advice 
Anyways, I’m developing a top-down space shooter game where the player can move in all directions. The controls are defined ala first person (left rotates the ship left, right rotates the ship right, up accelerates, down deccelerates).
My problem is with implementing the inertia effect in space.
What I did so far is use the spaceship’s “_rotation” property to decide in which direction it should fly, so basicly, _rotation is my “flight angle”.
However, I wanted to create the effect that when the player releases the acceleration button, and then rotates somewhere, the ship won’t fly in that direction, but continue going in the previous vector. I did this by using a variable called “flydirection” as my flight angle instead of _rotation. When I PRESS the acceleration button, “flydirection” is resetted to the value of _rotation (this.flydirection = this._rotation).
It works nicely, but the effect is not complete. I’ll illustrate it using this drawing:

A: The player flies in a certain direction (right) while accelerating. His _rotation is 90, and so is his “flydirection”.
B: The player releases the acceleration button, but continues to fly in the previously defined vector which is the “flydirection” variable. He rotates the ship left until his _rotation property is 0, but still continues to fly in the direction of “flydirection” because it wasn’t changed.
C: Now that his _rotation property is 0, the player starts accelerating again. In my current code, the “flydirection” variable is updated immediately at this point to _rotation, and thus his flying angle is changed also to 0, and therefore his ship now flies directly upwards.
This is a very bad effect because his speed is unchanged, and yet his flying angle is drasticly changed, it looks as if the ship suddenly “sprints” in a different direction without losing momentum.
What I want to do is what illustrated in the bottom drawing, to make the turn go somehow smoothly, and during that time the player would also lose and regain his speed.
Imagine what should happen if the change in the angle was 180 degrees and not 90. The ship should somehow start losing its current speed and then accelerating again once it reaches 0.
So, I hope I described it plainly enough for you to understand. Anyone has a good idea how to implement this? Maybe with the use of some crazy-*** physics formulas? If anyone already implemented this somewhere and could share his source code that would be even more wonderful.
Thanks,
-Flatline