Hi
Im am trying to rotate a movie clip and then move it in the direction it is facing using the keyboard (left, right = rotate. Up, down = forward and backwards)
I have almost done it using trigonometry but flash doesn’t know what angle the movie clip is facing.
Here is the code i used:
[INDENT]on (keyPress “<Up>”) {
Dist = 2
Angle =
currentY = this._y;
currentX = this._x;
this._x = currentX;
this._y = currentY;
this._x = currentX + Distmath.cos(Angle);
this._y = currentY + Distmath.sin(Angle);
}
[/INDENT]As you can see i dont know what to put ‘Angle’ equal to.
Thankyou!!!
Chaztheman