Step 5: Adjusting the rotation by -90 degrees
To correct the angle that the player stars moving towards, we can simply add or subtract numbers from the rotation in the sin and cos equations. In this example the ship is moving 90 degrees to the right, so we can subtract 90 degrees from the rotation like this:
And that should fix it!