Car game help: Moving forward relative to the direction changes.
Hey,
Just wondering how I can determine what coordinates my car needs to when I press up on my keyboard relative to the directions the car steers to.
Basically, when I steering the car I want it to still go forward after I've steered.
Here's the function I have prepared already:
| public function actions(event:Event):void { | ||||
| if (upKeyDown) { | ||||
| } | ||||
| if (rightKeyDown) { | ||||
| this.rotation+=steering; | ||||
| } | ||||
| if (leftKeyDown) { | ||||
| this.rotation-=steering; | ||||
| } | ||||
| } |
