Right now when i push thrust(up arrow) i want to go up what I’m getting is movement from right to left as if my thruster were rotated around to the side of my ship which of course won’t do…can anyone see the prob with the code???
public function moveShip():void
{
rotation += rVel;//right and left keys add or subtract to rVel
var angle:Number=rotation*Math.PI/180;
yAcc=Math.sin(angle) * thrust+gravity;//thrust+gravity;
xAcc=Math.cos(angle) * thrust;
yVel-=yAcc;
xVel-=xAcc;
yVel =yVel*.98;
rVel -=rVel*.25;
}