Can someone explain to me how to get a basic trig formula for stright movement based on direction?
Offline
If you are moving in direction A and move a distance of D steps, the change in your position will be
Change in X = D * Sin(A)
Change in Y = D * Cos(A)
Note that these equations assume you are using the Scratch coordinate system where zero degrees is in the direction of the Y axis. Many textbooks assume that the coordinate system is with zero degrees in the direction of the X axis. If that is the case, just swap Sin for Cos and vice-versa.
Offline
Thanx alot! Yeah, flash works diffrently then scratch, so im glad you told me that.
Offline