posted
Okay, do you understand what those lines are doing? Apparently car_mc._rotation is a variable holding the rotation direction in degrees. By converting to radians (that's the * Math.PI/180 stuff), you then take the cosine (or sine) to get the part of the direction in the x (or y) direction. Having this, you multiply it by the Acceleration to find the acceleration in each direction (x and y).
I'm not sure why these acceleration numbers are then assigned to car_mc._x and car_mc._y . I would think those were positions. If those are positions, you need to do something like the following:
That is, first you update the velocity of the car (whatever that member variable is called), then you update its position based on that velocity. Of course, all this should really be abstracted out, but whatever.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
Blayne Bradley
unregistered
posted
Okay I figured out the problem, aparently the symbol needs to be pointed in a particular direction first and then rotated to the proper direction for it to work.
IP: Logged |